feat(avatar): add user token accounting

This commit is contained in:
stefanfeng
2026-08-25 13:24:02 +08:00
parent 7a0199e685
commit 699bbbde57
15 changed files with 798 additions and 52 deletions
@@ -349,6 +349,9 @@ def _issue_session(db: Session, phone: str, info: dict):
db.commit()
db.refresh(user)
from services.token_billing import get_or_create_account
get_or_create_account(db, user.id)
return ok({
"token": user.app_token,
"user": user.to_dict(),