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:
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user