hiding websocket initalization behind authentication
This commit is contained in:
1 parent
f7f3ae7cc9
commit
4c81b6ebc5
5 files changed
+66
-50
No files matched your search
@@ -192,6 +192,9 @@ async def connect(sid, environ, auth):
|
||||
# print(f"user {user.name}({user.id}) connected with session ID {sid}")
|
||||
await sio.emit("user-list", {"user_ids": list(USER_POOL.keys())})
|
||||
await sio.emit("usage", {"models": get_models_in_use()})
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
||||
@sio.on("user-join")
|
||||
|
||||
Reference in new issue
Block a user