Skip to content

Commit

Permalink
fix webcfg
Browse files Browse the repository at this point in the history
  • Loading branch information
dadav committed Apr 1, 2020
1 parent d10bf6b commit 03c014f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pwnagotchi/plugins/default/webcfg.py
Expand Up @@ -499,12 +499,11 @@ def on_webhook(self, path, request):
elif request.method == "POST":
if path == "save-config":
try:
parsed_toml = toml.loads(request.get_json())
parsed_toml = json.loads(request.get_json())
save_config(parsed_toml, '/etc/pwnagotchi/config.toml')

_thread.start_new_thread(restart, (self.mode,))
return "success"
except Exception as ex:
logging.error(ex)
return "config error"
return "config error", 500
abort(404)

0 comments on commit 03c014f

Please sign in to comment.