mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 16:52:20 +00:00
fix(military): retire unavailable history and keep local trails
This commit is contained in:
1 parent
de2138e84c
commit
5f3d1eaa2f
6 files changed
+40
-34
No files matched your search
@@ -159,26 +159,8 @@ export function createMilitarySource({
|
||||
status: response.status,
|
||||
};
|
||||
},
|
||||
async getTrack(reference, { signal } = {}) {
|
||||
const { response, payload } = await readResponse(
|
||||
fetchImpl,
|
||||
'/api/military/track?hex=' + encodeURIComponent(reference),
|
||||
{ signal },
|
||||
'Military aircraft',
|
||||
);
|
||||
if (!response.ok) throw httpError(response, 'Military aircraft');
|
||||
const baseTimeMs = epoch(payload?.timestamp, 1000);
|
||||
return {
|
||||
records:
|
||||
baseTimeMs == null
|
||||
? []
|
||||
: normalizeAircraftTrack(payload?.trace, {
|
||||
baseTimeMs,
|
||||
readsb: true,
|
||||
}),
|
||||
complete: false,
|
||||
};
|
||||
},
|
||||
// ADSB.lol does not expose a supported live-history endpoint. Omitting
|
||||
// optional getTrack keeps the tracking layer on its accumulated trail.
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user