Overhaul refactor. Still things in progress

This commit is contained in:
2025-04-05 22:42:13 -04:00
parent 310d1eaad8
commit 769762dfa7
133 changed files with 119890 additions and 8784 deletions

11
ui-old/src/api/metar.ts Normal file
View File

@@ -0,0 +1,11 @@
import { Metar } from './metar.types';
import { getRequest } from '.';
export async function getMetars(icaos: string[]): Promise<Metar[]> {
if (icaos.length == 0) {
return [];
}
const stationICAOs: string = icaos.map((icao) => icao).join(',');
const response = await getRequest(`metars`, { icaos: stationICAOs });
return response?.json() || [];
}