Skip to content

Commit

Permalink
Update test_server.py
Browse files Browse the repository at this point in the history
  • Loading branch information
justinh-rahb authored Sep 3, 2023
1 parent 44e1b81 commit 79d9303
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@ def root():
@app.route('/post', methods=['POST'])
def google_chat_event():
try:
# Debug: Print the raw request data
# Log the raw request data for debugging
print("Raw Request Data:", request.data)

# Get the event data from the request body
response = process_event(request)

# Log the raw request data for debugging
print("Raw Response Data:", json.dumps(response.get_json(), indent=4))

return response
except Exception as e:
return jsonify({"error": str(e)}), 500

if __name__ == "__main__":
app.run(port=5000, debug=True)
app.run(port=5000)

0 comments on commit 79d9303

Please sign in to comment.