added MRT sds image

This commit is contained in:
PxlLoewe
2025-06-07 00:34:30 -07:00
parent 6be3f70371
commit dd53110500
16 changed files with 1853 additions and 136 deletions

View File

@@ -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 (