Persist config through backend controller
This commit is contained in:
@@ -81,6 +81,18 @@ def toggle_sensor_fault(name):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@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("/config")
|
@app.route("/config")
|
||||||
def get_config():
|
def get_config():
|
||||||
return jsonify(esp32.load_config())
|
return jsonify(esp32.load_config())
|
||||||
|
|||||||
Reference in New Issue
Block a user