Save to disk when config change

This commit is contained in:
Julien Duponchelle 2016-06-29 15:15:22 +02:00
parent 224708e451
commit 22f9effede
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -108,6 +108,8 @@ class ServerHandler:
201: "Writed" 201: "Writed"
}) })
def write_settings(request, response): def write_settings(request, response):
Controller.instance().settings = request.json controller = Controller.instance()
response.json(Controller.instance().settings) controller.settings = request.json
controller.save()
response.json(controller.settings)
response.set_status(201) response.set_status(201)