Skip to content

Commit

Permalink
Fix /user_message not returning json
Browse files Browse the repository at this point in the history
  • Loading branch information
0ptim committed Jul 31, 2023
1 parent 7eb6288 commit e8d722f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion backend/api_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def user_message_rest():
return make_response(jsonify({"error": "'application' is required"}), 400)

response = process_input(app_instance, user_token, message, application)
return make_response(response, 200)
return make_response(jsonify({"response": response}), 200)

@app.route("/history", methods=["POST"])
def get_user_history():
Expand Down
4 changes: 0 additions & 4 deletions backend/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,3 @@ def get_total_human_messages() -> int:
.execute()
)
return len(data.data)


if __name__ == "__main__":
print(get_total_human_messages())

0 comments on commit e8d722f

Please sign in to comment.