Oops
This commit is contained in:
@@ -56,8 +56,8 @@ def start_party():
|
||||
print("Party started!")
|
||||
return jsonify({"status": "ok", "message": "Party started"}), 200
|
||||
except Exception as ex:
|
||||
print(e)
|
||||
return jsonify({"status": "error", "message": f"An error occurred : {e}"}), 500
|
||||
print(ex)
|
||||
return jsonify({"status": "error", "message": f"An error occurred : {ex}"}), 500
|
||||
|
||||
@app.route("/command/party/play", methods=['POST'])
|
||||
def make_move():
|
||||
@@ -65,8 +65,8 @@ def make_move():
|
||||
game_service.make_move()
|
||||
return jsonify({"status": "ok", "message": "Party started"}), 200
|
||||
except Exception as ex:
|
||||
print(e)
|
||||
return jsonify({"status": "error", "message": f"An error occurred : {e}"}), 500
|
||||
print(ex)
|
||||
return jsonify({"status": "error", "message": f"An error occurred : {ex}"}), 500
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
|
||||
@@ -29,5 +29,5 @@ class GameService:
|
||||
encoded_frame = cv2.imencode('.jpg', img)
|
||||
image_bytes = encoded_frame[1].tobytes()
|
||||
headers = {'Content-Type': 'image/jpeg'}
|
||||
response = requests.post("https://192.168.15.125/party/image", data=image_bytes, headers=headers)
|
||||
response = requests.post("https://192.168.15.125:1880/party/image", data=image_bytes, headers=headers)
|
||||
print(response.status_code)
|
||||
Reference in New Issue
Block a user