Simulator nicht verbunden warnung
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user