added MRT sds image
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
import { ConnectedAircraft, PositionLog, Prisma, PublicUser, Station } from "@repo/db";
|
||||
import axios from "axios";
|
||||
import { serverApi } from "_helpers/axios";
|
||||
import { checkSimulatorConnected } from "_helpers/simulatorConnected";
|
||||
|
||||
export const getConnectedAircraftsAPI = async () => {
|
||||
const res = await axios.get<(ConnectedAircraft & { Station: Station })[]>("/api/aircrafts"); // return only connected aircrafts
|
||||
if (res.status !== 200) {
|
||||
throw new Error("Failed to fetch stations");
|
||||
}
|
||||
return res.data;
|
||||
return res.data.filter((a) => checkSimulatorConnected(a));
|
||||
};
|
||||
|
||||
export const editConnectedAircraftAPI = async (
|
||||
|
||||
Reference in New Issue
Block a user