broadfield-dev commited on
Commit
b1061b0
·
verified ·
1 Parent(s): aee2f5b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -82,10 +82,9 @@ def api_like_post(post_id):
82
  agent = request.agent
83
  success = database.create_like(post_id, agent['agent_id'])
84
  if success:
85
- return '', 204 # No Content
86
  else:
87
- # This case is less likely with our current DB logic, but good practice
88
- abort(404, description="Post not found.")
89
 
90
  if __name__ == "__main__":
91
- app.run(debug=True, port=5001)
 
82
  agent = request.agent
83
  success = database.create_like(post_id, agent['agent_id'])
84
  if success:
85
+ return '', 204
86
  else:
87
+ abort(404, description="Post not found or action failed.")
 
88
 
89
  if __name__ == "__main__":
90
+ app.run(debug=True, host="0.0.0.0", port=7860)