forked from open-webui/open-webui
feat: show user chats in admin panel
This commit is contained in:
parent
098ac18762
commit
bcf78b4efa
8 changed files with 301 additions and 52 deletions
|
@ -270,6 +270,15 @@ class ChatTable:
|
|||
# .limit(limit).offset(skip)
|
||||
]
|
||||
|
||||
def delete_chat_by_id(self, id: str) -> bool:
|
||||
try:
|
||||
query = Chat.delete().where((Chat.id == id))
|
||||
query.execute() # Remove the rows, return number of rows removed.
|
||||
|
||||
return True and self.delete_shared_chat_by_chat_id(id)
|
||||
except:
|
||||
return False
|
||||
|
||||
def delete_chat_by_id_and_user_id(self, id: str, user_id: str) -> bool:
|
||||
try:
|
||||
query = Chat.delete().where((Chat.id == id) & (Chat.user_id == user_id))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue