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

@@ -51,6 +51,10 @@ async def clear_user_demographics(db: AsyncSession, user_id: str) -> None:
)
async def clear_user_avatar_url(db: AsyncSession, user_id: str) -> None:
await db.execute(update(User).where(User.id == user_id).values(avatar_url=None))
async def collect_purge_context(
db: AsyncSession, user_id: str
) -> tuple[list[str], list[str], list[str]]:
@@ -130,6 +134,13 @@ async def collect_object_storage_keys_before_purge(
tts_urls if isinstance(tts_urls, list) else None
)
r_av = await db.execute(select(User.avatar_url).where(User.id == user_id))
avatar_url_val = r_av.scalar_one_or_none()
if avatar_url_val:
ak = extract_cos_object_key_if_owned(avatar_url_val)
if ak:
keys.add(ak)
return sorted(keys)