This commit is contained in:
2025-12-09 20:35:39 +09:00
parent 792db74014
commit a6b3c54534
2 changed files with 75 additions and 12 deletions

View File

@@ -1138,7 +1138,11 @@ async def client_websocket_endpoint(websocket: WebSocket, room_id: str, password
@app.websocket("/ws/admin/{session_id}")
async def admin_websocket_endpoint(websocket: WebSocket, session_id: str):
"""WebSocket для администраторов (просмотр и управление)"""
global admin_sessions
if not AdminAuth.verify_session(session_id):
print(f"[WebSocket] Admin connection REJECTED: session_id={session_id} not found in admin_sessions")
print(f"[WebSocket] Available sessions: {list(admin_sessions.keys()) if admin_sessions else 'None'}")
await websocket.close(code=1008)
return