Modified API calls and subprocess calls to work with the new system
This commit is contained in:
@@ -26,7 +26,7 @@ def requires_auth(f):
|
||||
|
||||
@app.route('/')
|
||||
def index():
|
||||
return '{"onFire": false}'
|
||||
return '{"onFire": false}\nGo to <a href="status">status</a>.'
|
||||
|
||||
@app.route('/status')
|
||||
@requires_auth
|
||||
@@ -37,8 +37,9 @@ def status():
|
||||
@requires_auth
|
||||
def users(what):
|
||||
if what == "fridge":
|
||||
subprocess.call("/home/pi/ELAB-RFID-I2C/RPi/i2c_challenge", shell=True)
|
||||
|
||||
subprocess.call("/home/pi/ELAB-RFID-I2C/RPi/i2c_challenge 0x20", shell=True)
|
||||
elif what == "tools":
|
||||
subprocess.call("/home/pi/ELAB-RFID-I2C/RPi/i2c_challenge 0x30", shell=True)
|
||||
print 'opened', what
|
||||
return redirect(url_for('status'))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user