add is_bot to current_user

This commit is contained in:
unknown 2025-11-06 03:46:05 +03:00
parent ce53d0d308
commit 6515e96649
2 changed files with 4 additions and 1 deletions

View File

@ -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"]

View File

@ -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"