mirror of
https://github.com/louislam/dockge.git
synced 2025-07-23 00:47:36 +02:00
12 lines
244 B
TypeScript
12 lines
244 B
TypeScript
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.");
|
|
}
|
|
}
|