added monitoring endpoint

master
git 2021-02-22 09:57:26 +01:00
parent 8e6c8afa31
commit 51b72a4c48
1 changed files with 6 additions and 1 deletions

View File

@ -34,6 +34,11 @@ def notify(config, message, var):
return
@app.route('/', methods=['GET'])
def statuscheck():
return jsonify(result=1)
@app.route('/wakeup', methods=['POST'])
def wakeup():
if verifyapikey(request.values['apikey'], config):
@ -52,5 +57,5 @@ def wakeup():
if __name__ == '__main__':
config = configparser.ConfigParser(interpolation=None)
config.read('../config.ini')
config.read('src/config.ini')
app.run(host='0.0.0.0')