fixe vehicle-alert

This commit is contained in:
PxlLoewe
2025-06-29 03:27:52 -07:00
parent 94a10c5fd7
commit 8ad558113d

View File

@@ -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,
},