Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Success mesage on feedback submit
Browse files- chat_application/main.py +6 -5
chat_application/main.py
CHANGED
|
@@ -647,8 +647,6 @@ def choose():
|
|
| 647 |
"created_at": datetime.utcnow(),
|
| 648 |
# user identity
|
| 649 |
"user_id": user_id,
|
| 650 |
-
# empty feedback history
|
| 651 |
-
"feedbacks": [],
|
| 652 |
})
|
| 653 |
|
| 654 |
session['room'] = room_id
|
|
@@ -842,9 +840,12 @@ def handle_message(payload):
|
|
| 842 |
{"_id": room},
|
| 843 |
{"$push": {"feedback_responses": db_feedback}}
|
| 844 |
)
|
| 845 |
-
|
| 846 |
-
|
| 847 |
-
|
|
|
|
|
|
|
|
|
|
| 848 |
|
| 849 |
@socketio.on('disconnect')
|
| 850 |
def handle_disconnect():
|
|
|
|
| 647 |
"created_at": datetime.utcnow(),
|
| 648 |
# user identity
|
| 649 |
"user_id": user_id,
|
|
|
|
|
|
|
| 650 |
})
|
| 651 |
|
| 652 |
session['room'] = room_id
|
|
|
|
| 840 |
{"_id": room},
|
| 841 |
{"$push": {"feedback_responses": db_feedback}}
|
| 842 |
)
|
| 843 |
+
|
| 844 |
+
if result:
|
| 845 |
+
print(result)
|
| 846 |
+
if result.modified_count > 0:
|
| 847 |
+
return True
|
| 848 |
+
return False
|
| 849 |
|
| 850 |
@socketio.on('disconnect')
|
| 851 |
def handle_disconnect():
|