|
@@ -31,6 +31,7 @@ import { CoordinateConverter, WaypointConverter } from '../generic/converters';
|
|
|
import { ActiveRunwaysDto } from './dto/activerunways.dto';
|
|
|
import { Runway } from './models/runway.model';
|
|
|
import { RunwayDto } from './dto/runway.dto';
|
|
|
+import { AirportOverviewDto } from './dto/airportoverview.dto';
|
|
|
|
|
|
@Controller('airport')
|
|
|
export class AirportController {
|
|
@@ -136,6 +137,8 @@ export class AirportController {
|
|
|
|
|
|
return {
|
|
|
icao: airport.icao,
|
|
|
+ name: airport.name,
|
|
|
+ flightInformationRegion: airport.flightInformationRegion,
|
|
|
location: WaypointConverter.convert<WaypointDto, CoordinateDto>(
|
|
|
airport.location,
|
|
|
),
|
|
@@ -166,6 +169,8 @@ export class AirportController {
|
|
|
|
|
|
return {
|
|
|
icao: airport.icao,
|
|
|
+ name: airport.name,
|
|
|
+ flightInformationRegion: airport.flightInformationRegion,
|
|
|
location: WaypointConverter.convert<Waypoint, Coordinate>(
|
|
|
airport.location,
|
|
|
),
|
|
@@ -241,14 +246,14 @@ export class AirportController {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- @Get('/allCodes')
|
|
|
+ @Get('/all')
|
|
|
@ApiResponse({
|
|
|
status: 200,
|
|
|
description: 'All available airports',
|
|
|
- type: [String],
|
|
|
+ type: [AirportOverviewDto],
|
|
|
})
|
|
|
- async allCodes(): Promise<string[]> {
|
|
|
- return this.airportService.airportsList();
|
|
|
+ async all(): Promise<AirportOverviewDto[]> {
|
|
|
+ return this.airportService.allAirports();
|
|
|
}
|
|
|
|
|
|
@Get('/get')
|