mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
Only restart modem if config is valid
This commit is contained in:
parent
47242fb33e
commit
796d1c0566
1 changed files with 1 additions and 1 deletions
|
@ -94,10 +94,10 @@ def index():
|
||||||
def config():
|
def config():
|
||||||
if request.method in ['POST']:
|
if request.method in ['POST']:
|
||||||
set_config = app.config_manager.write(request.json)
|
set_config = app.config_manager.write(request.json)
|
||||||
app.modem_service.put("restart")
|
|
||||||
if not set_config:
|
if not set_config:
|
||||||
response = api_response(None, 'error writing config')
|
response = api_response(None, 'error writing config')
|
||||||
else:
|
else:
|
||||||
|
app.modem_service.put("restart")
|
||||||
response = api_response(set_config)
|
response = api_response(set_config)
|
||||||
return response
|
return response
|
||||||
elif request.method == 'GET':
|
elif request.method == 'GET':
|
||||||
|
|
Loading…
Reference in a new issue