fix
This commit is contained in:
2
api.py
2
api.py
@@ -18,7 +18,7 @@ def main():
|
||||
@app.route('/dialog')
|
||||
def dialog():
|
||||
html = "<html><head></head><body>"
|
||||
for message in mongo.messages_collection.find({"dialog_id": ObjectId(request.args.get('dialog_id'))}).sort([('sent_at', 1)]):
|
||||
for message in mongo.messages_collection.find({"dialog_id": ObjectId(request.args.get('id'))}).sort([('sent_at', 1)]):
|
||||
html += f'{message["sender"]}: {message["text"]}<br>'
|
||||
html += "</body></html>"
|
||||
return html
|
||||
|
||||
Reference in New Issue
Block a user