introduce the database and controller connections for all inbounds

This commit is contained in:
Sven Czarnian
2022-10-23 16:58:00 +02:00
parent 7a41dd0fb2
commit f69e365623
19 changed files with 849 additions and 4 deletions

View File

@@ -25,9 +25,9 @@ export class AirportService {
}
async airport(icao: string): Promise<Airport> {
return this.airportModel.find({ icao }).then((response) => {
if (!response || response.length !== 1) return null;
return response[0];
return this.airportModel.findOne({ icao }).then((response) => {
if (!response) return null;
return response;
});
}