fix: fixes to match balance fields and referal balance fixes

This commit is contained in:
2026-08-12 11:45:15 +07:00
parent d1f7612f37
commit 8cb1ac89a6
4 changed files with 4 additions and 1 deletions

View File

@@ -27,6 +27,7 @@ class Settings(BaseSettings):
remnawave_default_squads_raw: str = Field(alias="REMNAWAVE_DEFAULT_SQUADS_UUIDS") remnawave_default_squads_raw: str = Field(alias="REMNAWAVE_DEFAULT_SQUADS_UUIDS")
minimal_deposit: int = Field() minimal_deposit: int = Field()
referal_bonus: int = Field(30)
@computed_field @computed_field
@property @property

View File

@@ -41,6 +41,7 @@ async def signup(req: UserRegistration, session: AsyncSession = Depends(get_db))
username=user.username, username=user.username,
telegram_id=user.telegram_id, telegram_id=user.telegram_id,
referal_code=user.referal_code, referal_code=user.referal_code,
bonus_balance=user.balance,
).model_dump(), ).model_dump(),
status_code=201, status_code=201,
) )

View File

@@ -16,6 +16,7 @@ async def get_me(ctx: AuthContext = Depends(get_auth_context)):
username=ctx.user.username, username=ctx.user.username,
telegram_id=ctx.user.telegram_id, telegram_id=ctx.user.telegram_id,
referal_code=ctx.user.referal_code, referal_code=ctx.user.referal_code,
bonus_balance=ctx.user.balance,
) )

View File

@@ -22,7 +22,7 @@ async def authorize_user(
username=user.username, username=user.username,
telegram_id=user.telegram_id, telegram_id=user.telegram_id,
referal_code=user.referal_code, referal_code=user.referal_code,
bonus_balance=user.balance bonus_balance=user.balance,
), ),
expires_at=key_pair.expires_at, expires_at=key_pair.expires_at,
) )