mirror of
https://github.com/louislam/dockge.git
synced 2025-08-17 04:51:14 +02:00
wip
This commit is contained in:
11
backend/util-server.ts
Normal file
11
backend/util-server.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import { Socket } from "socket.io";
|
||||
|
||||
export interface DockgeSocket extends Socket {
|
||||
userID: number;
|
||||
}
|
||||
|
||||
export function checkLogin(socket : DockgeSocket) {
|
||||
if (!socket.userID) {
|
||||
throw new Error("You are not logged in.");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user