Изменения вебсокета
This commit is contained in:
parent
c945b8a904
commit
fa669cec49
1 changed files with 5 additions and 1 deletions
|
@ -1,3 +1,4 @@
|
|||
import logging
|
||||
from typing import Annotated
|
||||
|
||||
from fastapi import Depends, Header
|
||||
|
@ -53,7 +54,10 @@ async def check_verificated_user_with_exc(user: SUser = Depends(get_current_user
|
|||
def get_token_ws(sec_websocket_protocol: Annotated[str | None, Header()] = None,) -> str:
|
||||
if sec_websocket_protocol is None:
|
||||
raise TokenAbsentException
|
||||
return sec_websocket_protocol.split()[1]
|
||||
logging.critical(sec_websocket_protocol)
|
||||
logging.critical(sec_websocket_protocol.split())
|
||||
|
||||
return sec_websocket_protocol
|
||||
|
||||
|
||||
async def get_current_user_ws(token: str = Depends(get_token_ws), uow=Depends(UnitOfWork)):
|
||||
|
|
Loading…
Add table
Reference in a new issue