From 8cb1ac89a65bc9b4f125bb273e5e4a05678bb5ed Mon Sep 17 00:00:00 2001 From: hexdev Date: Wed, 12 Aug 2026 11:45:15 +0700 Subject: [PATCH] fix: fixes to match balance fields and referal balance fixes --- config.py | 1 + routes/auth.py | 1 + routes/users.py | 1 + services/users.py | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config.py b/config.py index 34d1893..9f36c9a 100644 --- a/config.py +++ b/config.py @@ -27,6 +27,7 @@ class Settings(BaseSettings): remnawave_default_squads_raw: str = Field(alias="REMNAWAVE_DEFAULT_SQUADS_UUIDS") minimal_deposit: int = Field() + referal_bonus: int = Field(30) @computed_field @property diff --git a/routes/auth.py b/routes/auth.py index e54009f..29bfcfb 100644 --- a/routes/auth.py +++ b/routes/auth.py @@ -41,6 +41,7 @@ async def signup(req: UserRegistration, session: AsyncSession = Depends(get_db)) username=user.username, telegram_id=user.telegram_id, referal_code=user.referal_code, + bonus_balance=user.balance, ).model_dump(), status_code=201, ) diff --git a/routes/users.py b/routes/users.py index f926749..2064576 100644 --- a/routes/users.py +++ b/routes/users.py @@ -16,6 +16,7 @@ async def get_me(ctx: AuthContext = Depends(get_auth_context)): username=ctx.user.username, telegram_id=ctx.user.telegram_id, referal_code=ctx.user.referal_code, + bonus_balance=ctx.user.balance, ) diff --git a/services/users.py b/services/users.py index 87bac6d..6b6c152 100644 --- a/services/users.py +++ b/services/users.py @@ -22,7 +22,7 @@ async def authorize_user( username=user.username, telegram_id=user.telegram_id, referal_code=user.referal_code, - bonus_balance=user.balance + bonus_balance=user.balance, ), expires_at=key_pair.expires_at, )