chat websocket api support param token and x-api-key
This commit is contained in:
parent
d5841a05c8
commit
46ea695fc1
1 changed files with 1 additions and 1 deletions
|
|
@ -29,7 +29,7 @@ async def chat(
|
|||
await websocket.accept()
|
||||
if not user:
|
||||
await websocket.close(code=status.WS_1008_POLICY_VIOLATION, reason="Unauthorized")
|
||||
if not user.is_active:
|
||||
elif not user.is_active:
|
||||
await websocket.close(code=status.WS_1008_POLICY_VIOLATION, reason="Unauthorized")
|
||||
|
||||
if client_id in chat_service.cache_service:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue