Simulator nicht verbunden warnung

This commit is contained in:
PxlLoewe
2025-06-27 21:40:23 -07:00
parent a2db875569
commit dc92174798
12 changed files with 114 additions and 16 deletions

View File

@@ -11,6 +11,16 @@ export const getConnectedAircraftsAPI = async () => {
return res.data.filter((a) => checkSimulatorConnected(a));
};
export const getAircraftsAPI = async (filter?: Prisma.ConnectedAircraftWhereInput) => {
const res = await axios.get<(ConnectedAircraft & { Station: Station })[]>("/api/aircrafts", {
params: { filter: JSON.stringify(filter) },
});
if (res.status !== 200) {
throw new Error("Failed to fetch stations");
}
return res.data;
};
export const editConnectedAircraftAPI = async (
id: number,
mission: Prisma.ConnectedAircraftUpdateInput,