fix: fixes to match balance fields and referal balance fixes
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user