add is_bot to current_user
This commit is contained in:
parent
ce53d0d308
commit
6515e96649
@ -15,6 +15,7 @@ auth_scheme = HTTPBearer()
|
||||
@dataclass
|
||||
class CurrentUser:
|
||||
token: str
|
||||
is_bot: bool
|
||||
user_id: str
|
||||
session_id: str
|
||||
permissions: List[str]
|
||||
@ -56,6 +57,7 @@ async def _fetch_current_user(
|
||||
|
||||
return CurrentUser(
|
||||
token=token,
|
||||
is_bot=is_bot,
|
||||
user_id=data["user_id"],
|
||||
session_id=data["session_id"],
|
||||
permissions=data["permissions"]
|
||||
@ -124,6 +126,7 @@ async def fetch_user_for_sio(
|
||||
|
||||
return CurrentUser(
|
||||
token=token,
|
||||
is_bot=is_bot,
|
||||
user_id=data["user_id"],
|
||||
session_id=data["session_id"],
|
||||
permissions=data["permissions"]
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "common-lib"
|
||||
version = "0.0.36"
|
||||
version = "0.0.37"
|
||||
description = "Библиотека общих компонентов для микросервисов yobble"
|
||||
authors = [{ name = "cheykrym", email = "you@example.com" }]
|
||||
license = "MIT"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user