diff --git a/routes/users.py b/routes/users.py index cefd31b..f926749 100644 --- a/routes/users.py +++ b/routes/users.py @@ -36,7 +36,7 @@ async def get_subscription(ctx: AuthContext = Depends(get_auth_context)): has_subscription=True, devices=sub.devices, expires_at=sub.expires_at, - addon_ids=[a.id for a in sub.addons], + addon_ids=[a.addon_id for a in sub.addons], subscription_link=build_subscription_link(rw_user.short_uuid), ) diff --git a/schemas/user.py b/schemas/user.py index 1e90d13..7b1c255 100644 --- a/schemas/user.py +++ b/schemas/user.py @@ -15,3 +15,4 @@ class UserInfo(BaseModel): username: str | None = Field(None) telegram_id: str | None = Field(None) referal_code: str = Field() + bonus_balance: float = Field() diff --git a/services/users.py b/services/users.py index 6463692..87bac6d 100644 --- a/services/users.py +++ b/services/users.py @@ -22,6 +22,7 @@ async def authorize_user( username=user.username, telegram_id=user.telegram_id, referal_code=user.referal_code, + bonus_balance=user.balance ), expires_at=key_pair.expires_at, )