mirror of
https://github.com/mblanke/Gov_Travel_App.git
synced 2026-03-01 14:10:22 -05:00
Integrate OpenFlights API for free, no-auth flight data generation
- Added openFlightsService.js to fetch and cache OpenFlights airport/airline/routes data - Validates airport codes exist in OpenFlights database (6072+ airports) - Generates realistic flights using major international airlines - Creates varied routing options: direct, 1-stop, 2-stop flights - Updated flightService.js to use OpenFlights as primary source before Amadeus - OpenFlights as fallback if Amadeus unavailable or returns no results - No API keys or authentication required - Cached locally to avoid repeated network requests - Realistic pricing, times, and stop locations Docker container rebuilt with OpenFlights integration.
This commit is contained in:
@@ -1209,7 +1209,12 @@ function displayFlightResults(flights) {
|
||||
<strong>${
|
||||
flight.stops === 0
|
||||
? "Direct Flight"
|
||||
: flight.stops + " stop" + (flight.stops > 1 ? "s" : "")
|
||||
: flight.stops +
|
||||
" stop" +
|
||||
(flight.stops > 1 ? "s" : "") +
|
||||
(flight.stopCodes && flight.stopCodes.length > 0
|
||||
? " (" + flight.stopCodes.join(", ") + ")"
|
||||
: "")
|
||||
}</strong>
|
||||
</span>
|
||||
<span style="height: 16px; width: 1px; background: #cbd5e1;"></span>
|
||||
|
||||
Reference in New Issue
Block a user