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