Continue Flask migration.

This commit is contained in:
yohan 2024-06-03 00:47:14 +02:00
parent aa69c98fc7
commit dd48e6629f

View File

@ -226,12 +226,12 @@ class Set_verbosity_thermostat(Resource):
@auth_required
@api.expect(Set_verbosity_model, validate=True)
def put(self):
xprint(api.payload.value)
if api.payload.value == 'DEBUG':
xprint(api.payload)
if api.payload["value"] == 'DEBUG':
logging.getLogger().setLevel(logging.DEBUG)
elif api.payload.value == 'INFO':
elif api.payload["value"] == 'INFO':
logging.getLogger().setLevel(logging.INFO)
elif api.payload.value == 'WARNING':
elif api.payload["value"] == 'WARNING':
logging.getLogger().setLevel(logging.WARNING)
return "OK", 201