We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c624e4d commit b77bc22Copy full SHA for b77bc22
machine_controller/app.py
@@ -65,8 +65,17 @@ def vend():
65
66
return jsonify(transaction_id=transaction_id, items=statuses)
67
68
+@app.route('/status', methods=['GET'])
69
+def status():
70
+ if request.headers.get('Authorization', '') != token_value:
71
+ abort(401)
72
+
73
+ # 200 to indicate success
74
+ return ('', 200)
75
76
77
78
if __name__ == '__main__':
79
# Make sure flask runs in a single thread. Otherwise concurrent requests
80
# may cause problems with vending
81
app.run(debug=True, host='0.0.0.0', threaded=False)
-
0 commit comments