Continue Flask migration.

This commit is contained in:
yohan 2024-06-03 00:54:47 +02:00
parent dd48e6629f
commit 4a87b1b1e7

View File

@ -205,6 +205,8 @@ class Set_mode_thermostat(Resource):
logging.error(e) logging.error(e)
return "K0", 400 return "K0", 400
new_forced_mode = data.value new_forced_mode = data.value
xprint(data)
xprint(new_forced_mode)
return "OK", 201 return "OK", 201
@ns_thermostat.route('/status') @ns_thermostat.route('/status')
@ -226,7 +228,6 @@ class Set_verbosity_thermostat(Resource):
@auth_required @auth_required
@api.expect(Set_verbosity_model, validate=True) @api.expect(Set_verbosity_model, validate=True)
def put(self): def put(self):
xprint(api.payload)
if api.payload["value"] == 'DEBUG': if api.payload["value"] == 'DEBUG':
logging.getLogger().setLevel(logging.DEBUG) logging.getLogger().setLevel(logging.DEBUG)
elif api.payload["value"] == 'INFO': elif api.payload["value"] == 'INFO':