Button to clean chat history

This commit is contained in:
TomasMatarazzo
2024-04-17 19:51:29 -03:00
parent 130c83ee92
commit 6f9ddeaed0
3 changed files with 101 additions and 2 deletions

View File

@@ -37,6 +37,11 @@ def delete_conversation():
return {"status": "ok"}
@user.route("/api/delete_all_conversations", methods=["POST"])
def delete_all_conversations():
conversations_collection.delete_many({})
return {"status": "ok"}
@user.route("/api/get_conversations", methods=["get"])
def get_conversations():
# provides a list of conversations