mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
adjusted config setting for avoiding restart
This commit is contained in:
parent
e284a58db9
commit
6f64b61ea5
|
@ -96,6 +96,10 @@ def index():
|
|||
@app.route('/config', methods=['GET', 'POST'])
|
||||
def config():
|
||||
if request.method in ['POST']:
|
||||
# check if config already exists
|
||||
if app.config_manager.read() == request.json:
|
||||
return api_response(request.json)
|
||||
|
||||
set_config = app.config_manager.write(request.json)
|
||||
if not set_config:
|
||||
response = api_response(None, 'error writing config')
|
||||
|
|
Loading…
Reference in a new issue