implemented connectedDispatch record for dispatcher

This commit is contained in:
PxlLoewe
2025-05-01 21:48:25 -07:00
parent 504ef3cdb8
commit 26e71bcaa8
16 changed files with 287 additions and 115 deletions

View File

@@ -0,0 +1,22 @@
import { prisma } from "@repo/db";
import { Router } from "express";
const router = Router();
router.get("/connected-users", async (req, res) => {
const connectedDispatcher = await prisma.connectedDispatcher.findMany({
where: {
logoutTime: null,
},
});
const connectedAircraft = await prisma.connectedAircraft.findMany({
where: {
logoutTime: null,
},
});
res.json([...connectedDispatcher, ...connectedAircraft]);
});
export default router;