Skip to content

Commit

Permalink
Add status page
Browse files Browse the repository at this point in the history
  • Loading branch information
abrandemuehl committed Apr 8, 2017
1 parent c624e4d commit b77bc22
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion machine_controller/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,17 @@ def vend():

return jsonify(transaction_id=transaction_id, items=statuses)

@app.route('/status', methods=['GET'])
def status():
if request.headers.get('Authorization', '') != token_value:
abort(401)

# 200 to indicate success
return ('', 200)



if __name__ == '__main__':
# Make sure flask runs in a single thread. Otherwise concurrent requests
# may cause problems with vending
app.run(debug=True, host='0.0.0.0', threaded=False)

0 comments on commit b77bc22

Please sign in to comment.