feat(ui): add 'Unshare All Shared Chats' button to Shared Chats modal (#25848)

This commit is contained in:
G30 authored and GitHub committed 2026-06-17 03:06:41 +02:00
1 parent dfdb76cc46
commit 4584adf900
5 files changed
+114 -3

No files matched your search

+10
View File
@@ -201,5 +201,15 @@ class SharedChatsTable:
except Exception:
return False
async def delete_all_by_user_id(self, user_id: str, db: Optional[AsyncSession] = None) -> bool:
"""Delete all shared chats created by a user."""
try:
async with get_async_db_context(db) as db:
await db.execute(delete(SharedChat).filter_by(user_id=user_id))
await db.commit()
return True
except Exception:
return False
SharedChats = SharedChatsTable()