refactor(server): drop the state helpers the injected stores replaced

setPermissionsCache and the free leaveRoom, leaveAllRooms and
leaveAllBooks lost their last caller when the services moved onto the
injected stores.
This commit is contained in:
Maurice
2026-10-08 21:15:17 +02:00
parent 9c39a0fc58
commit 2b218a5528
2 changed files with 0 additions and 18 deletions
@@ -59,11 +59,6 @@ export function getPermissionsCache(): Promise<Map<string, PermissionLevel> | nu
return permissionsCacheSlot.get().get();
}
/** Install a fresh cache map and return it (the loader fills it in place). */
export function setPermissionsCache(next: Map<string, PermissionLevel>): Promise<Map<string, PermissionLevel>> {
return permissionsCacheSlot.get().set(next);
}
export function invalidatePermissionsCache(): Promise<void> {
return permissionsCacheSlot.get().invalidate();
}
-13
View File
@@ -174,14 +174,6 @@ export function joinRoom(ws: TrekWebSocket, tripId: number): void {
roomsSlot.get().join(ws, tripId);
}
export function leaveRoom(ws: TrekWebSocket, tripId: number): void {
roomsSlot.get().leave(ws, tripId);
}
export function leaveAllRooms(ws: TrekWebSocket): void {
roomsSlot.get().leaveAll(ws);
}
// ── Studio books ──────────────────────────────────────────────────────────
export interface BookPeer {
@@ -199,11 +191,6 @@ export function leaveBook(ws: TrekWebSocket, journeyId: number): void {
roomsSlot.get().leaveBook(ws, journeyId);
}
/** Every book this socket had open — called when the connection goes. */
export function leaveAllBooks(ws: TrekWebSocket): number[] {
return roomsSlot.get().leaveAllBooks(ws);
}
/**
* Who is in a book, by socket rather than by user.
*