Added time update from Dispatcher
This commit is contained in:
@@ -15,8 +15,8 @@ const removeClosedMissions = async () => {
|
||||
|
||||
const now = new Date();
|
||||
if (!lastAlertTime) return;
|
||||
// change State to closed if last alert was more than 120 minutes ago
|
||||
if (lastAlertTime && now.getTime() - lastAlertTime.getTime() > 120 * 60 * 1000) {
|
||||
// change State to closed if last alert was more than 180 minutes ago
|
||||
if (lastAlertTime && now.getTime() - lastAlertTime.getTime() > 180 * 60 * 1000) {
|
||||
const log: MissionLog = {
|
||||
type: "completed-log",
|
||||
auto: true,
|
||||
|
||||
@@ -71,8 +71,8 @@ export const handleConnectDispatch =
|
||||
socket.join(`user:${user.id}`); // Dem User-Raum beitreten
|
||||
|
||||
io.to(`user:${user.id}`).emit("dispatchers-update", connectedDispatcherEntry);
|
||||
io.to("dispatchers").emit("dispatchers-update");
|
||||
io.to("pilots").emit("dispatchers-update");
|
||||
io.to("dispatchers").emit("dispatchers-update", connectedDispatcherEntry);
|
||||
io.to("pilots").emit("dispatchers-update", connectedDispatcherEntry);
|
||||
|
||||
socket.on("stop-other-transmition", async ({ ownRole, otherRole }) => {
|
||||
const aircrafts = await prisma.connectedAircraft.findMany({
|
||||
|
||||
Reference in New Issue
Block a user