Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -104,7 +104,7 @@ def get_treadlist_of_user(user_name):
|
|
104 |
|
105 |
|
106 |
|
107 |
-
def
|
108 |
# Connect to the database
|
109 |
connection_load_chat = mysql.connector.connect(
|
110 |
host=host,
|
@@ -301,7 +301,7 @@ async def process_query(query: str,
|
|
301 |
|
302 |
@app.post("/get_messagesOfThread")
|
303 |
async def get_thread_chats(thread_id:str):
|
304 |
-
return
|
305 |
|
306 |
|
307 |
@app.post("/get_thread_lists")
|
|
|
104 |
|
105 |
|
106 |
|
107 |
+
def get_messages_of_thread(thread_id):
|
108 |
# Connect to the database
|
109 |
connection_load_chat = mysql.connector.connect(
|
110 |
host=host,
|
|
|
301 |
|
302 |
@app.post("/get_messagesOfThread")
|
303 |
async def get_thread_chats(thread_id:str):
|
304 |
+
return get_messages_of_thread(thread_id)
|
305 |
|
306 |
|
307 |
@app.post("/get_thread_lists")
|