Continue Flask migration.
This commit is contained in:
parent
aa69c98fc7
commit
dd48e6629f
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user