Files
TREK/client/src/api/flightLive.ts
T
Maurice 4796615439 feat(flight-live): a live boarding pass on the web, desktop and phone
The booking dialog and the phone's transport sheet show a flight's moment,
both airports with planned and expected times, the route as an arc with the
aircraft on it and the numbers of the flight; booking cards and day plan
rows get a one-line state with a progress bar. The trip map draws the
aircraft in the air on Leaflet and GL, and the admin settings carry the
switch. Translated into every language.
2026-11-13 15:29:10 +01:00

12 lines
483 B
TypeScript

import apiClient from './client';
/**
* GET /api/trips/:tripId/flights/live: the live state of every flight leg of a
* trip TREK can follow. The answer comes back unparsed; store/flightLiveStore.ts
* checks it against the shared contract before anything draws it.
*/
export const flightLiveApi = {
trip: (tripId: number, signal?: AbortSignal): Promise<unknown> =>
apiClient.get(`/trips/${tripId}/flights/live`, { signal }).then((response) => response.data as unknown),
};