From 8ad558113d419a7d3049582c22991d06c5bca117 Mon Sep 17 00:00:00 2001 From: PxlLoewe <72106766+PxlLoewe@users.noreply.github.com> Date: Sun, 29 Jun 2025 03:27:52 -0700 Subject: [PATCH] fixe vehicle-alert --- apps/dispatch-server/routes/mission.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/dispatch-server/routes/mission.ts b/apps/dispatch-server/routes/mission.ts index 7dd40b94..5c13b3fc 100644 --- a/apps/dispatch-server/routes/mission.ts +++ b/apps/dispatch-server/routes/mission.ts @@ -124,9 +124,17 @@ router.post("/:id/send-alert", async (req, res) => { try { if (vehicleName) { + const mission = await prisma.mission.findFirst({ + where: { + id: Number(id), + }, + select: { + missionStationIds: true, + }, + }); const hpgAircrafts = await prisma.connectedAircraft.findMany({ where: { - stationId: Number(id), + stationId: { in: mission?.missionStationIds }, logoutTime: null, posH145active: true, },