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"
})
def write_settings(request, response):
Controller.instance().settings = request.json
response.json(Controller.instance().settings)
controller = Controller.instance()
controller.settings = request.json
controller.save()
response.json(controller.settings)
response.set_status(201)