adjusted config setting for avoiding restart

This commit is contained in:
DJ2LS 2024-02-22 10:58:28 +01:00
parent e284a58db9
commit 6f64b61ea5
1 changed files with 4 additions and 0 deletions

View File

@ -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')