add some description entries for the UI

This commit is contained in:
Sven Czarnian
2022-11-01 02:00:49 +01:00
부모 42235e6e17
커밋 bb9044698d
5개의 변경된 파일71개의 추가작업 그리고 8개의 파일을 삭제

파일 보기

@@ -2,6 +2,7 @@ import { Injectable } from '@nestjs/common';
import { InjectModel } from '@nestjs/mongoose';
import { Model } from 'mongoose';
import { ActiveRunwaysDto } from './dto/activerunways.dto';
import { AirportOverviewDto } from './dto/airportoverview.dto';
import { Airport, AirportDocument } from './models/airport.model';
@Injectable()
@@ -17,11 +18,17 @@ export class AirportService {
.then((response) => response && response.length !== 0);
}
async airportsList(): Promise<string[]> {
async allAirports(): Promise<AirportOverviewDto[]> {
return this.airportModel.find({}).then((response) => {
const icaoCodes: string[] = [];
response.forEach((airport) => icaoCodes.push(airport.icao));
return icaoCodes;
const retval: AirportOverviewDto[] = [];
response.forEach((airport) =>
retval.push({
icao: airport.icao,
name: airport.name,
flightInformationRegion: airport.flightInformationRegion,
}),
);
return retval;
});
}