introduce the database and controller connections for all inbounds
This commit is contained in:
@@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user