Persist config through backend controller
This commit is contained in:
1 parent
fa20478b64
commit
e6e74a0b3a
3 files changed
+37
-12
No files matched your search
@@ -80,6 +80,18 @@ def toggle_sensor_fault(name):
|
||||
return jsonify(response)
|
||||
|
||||
|
||||
|
||||
@app.route("/config")
|
||||
def get_config():
|
||||
return jsonify(esp32.load_config())
|
||||
|
||||
|
||||
@app.route("/config", methods=["POST"])
|
||||
def save_config():
|
||||
config = request.get_json(force=True)
|
||||
return jsonify(esp32.save_config(config))
|
||||
|
||||
|
||||
@app.route("/comms")
|
||||
def comms():
|
||||
return jsonify(pico.get_comms())
|
||||
|
||||
Reference in new issue
Block a user