implemented #76

This commit is contained in:
PxlLoewe
2025-07-23 19:06:35 -07:00
parent 115296d7f7
commit 0b0f4fac2f
6 changed files with 45 additions and 6 deletions

View File

@@ -6,7 +6,15 @@ import { Server, Socket } from "socket.io";
export const handleConnectDispatch =
(socket: Socket, io: Server) =>
async ({ logoffTime, selectedZone }: { logoffTime: string; selectedZone: string }) => {
async ({
logoffTime,
selectedZone,
ghostMode,
}: {
logoffTime: string;
selectedZone: string;
ghostMode: boolean;
}) => {
try {
const user: User = socket.data.user; // User ID aus dem JWT-Token
@@ -53,6 +61,7 @@ export const handleConnectDispatch =
userId: user.id,
zone: selectedZone,
loginTime: new Date().toISOString(),
ghostMode,
},
});