summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorleonoverweel <l.overweel@gmail.com>2017-04-04 15:23:00 +0200
committerleonoverweel <l.overweel@gmail.com>2017-04-04 15:23:00 +0200
commitfd0376c5a8f018457a11bb0f9602bda366571955 (patch)
treefdad42c44a147e03101925ffd4d62a869bac4490
parent2a4954077362d7b81a36a59580487972453180b4 (diff)
Return proper status codes of HTTP
Instead of always 200
-rw-r--r--main.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.py b/main.py
index ec404239..3dbb2a53 100644
--- a/main.py
+++ b/main.py
@@ -142,7 +142,9 @@ def api_call(version, endpoint_path):
)
sys.stdout.flush()
- return jsonify(json.loads(response.to_JSON()))
+ flask_response = jsonify(json.loads(response.to_JSON()))
+ flask_response.status_code = response.status['code']
+ return flask_response
@SOCKET_IO_CORE.on('request')
def receive_message(message):