Изменение вебсокета
This commit is contained in:
parent
6103b60da1
commit
b8c77bfae7
1 changed files with 3 additions and 3 deletions
|
@ -136,15 +136,15 @@ manager = ConnectionManager()
|
|||
async def websocket_endpoint(
|
||||
chat_id: int,
|
||||
websocket: WebSocket,
|
||||
authorization: Annotated[str | None, Header()] = None,
|
||||
sec_websocket_protocol: Annotated[str | None, Header()] = None,
|
||||
# user: SUser = Depends(get_current_user_ws),
|
||||
uow=Depends(UnitOfWork)
|
||||
):
|
||||
# await AuthService.check_verificated_user_with_exc(uow=uow, user_id=user.id)
|
||||
# await AuthService.validate_user_access_to_chat(uow=uow, user_id=user.id, chat_id=chat_id)
|
||||
await manager.connect(chat_id, websocket)
|
||||
logging.critical(authorization)
|
||||
await websocket.send_json({"headers": str(websocket.headers), "authorization": authorization})
|
||||
logging.critical(sec_websocket_protocol)
|
||||
await websocket.send_json({"headers": str(websocket.headers), "authorization": sec_websocket_protocol})
|
||||
try:
|
||||
while True:
|
||||
data = await websocket.receive_json()
|
||||
|
|
Loading…
Add table
Reference in a new issue