chore: resolve WIP after merging internal/development

- .gitignore: keep api/uploads ignore and copyright_source_listing.pdf path

- auth: keep COS avatar upload URL; delete prior COS object when applying preset

- i18n: regenerate resources.ts (includes profile tapAwayToClose)

- Avatar/COS tests and personal-info remain from prior local work

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Kevin
2026-05-18 15:34:50 +08:00
parent 98802240ac
commit eabda2c6a9
12 changed files with 350 additions and 97 deletions

View File

@@ -2,6 +2,7 @@ from datetime import timedelta
from sqlalchemy.ext.asyncio import AsyncSession
from app.core.cos_url_keys import avatar_url_for_api_response
from app.core.db import utc_now
from app.core.logging import get_logger
from app.core.redis import redis_service
@@ -32,7 +33,7 @@ def _user_to_profile(user: User) -> UserProfileResponse:
phone=user.phone,
email=user.email,
nickname=user.nickname,
avatar_url=user.avatar_url,
avatar_url=avatar_url_for_api_response(user.avatar_url),
subscription_type=user.subscription_type,
created_at=user.created_at.isoformat(),
birth_year=user.birth_year,
@@ -121,6 +122,7 @@ class UserService:
await repo.purge_user_related_rows(self._db, user_id)
await repo.clear_user_demographics(self._db, user_id)
await repo.clear_user_avatar_url(self._db, user_id)
await self._db.commit()
logger.info("用户数据 DB 行已删除、档案字段已清空并提交 user_id={}", user_id)