Compare commits
2 Commits
4d66f92aac
...
2f8b3e95c5
Author | SHA1 | Date |
---|---|---|
Ceda EI | 2f8b3e95c5 | |
Ceda EI | 2ba463c9dc |
6
app.py
6
app.py
|
@ -23,6 +23,12 @@ def set_data_point(data_id):
|
||||||
json.dump(data, f)
|
json.dump(data, f)
|
||||||
return jsonify({"success": True})
|
return jsonify({"success": True})
|
||||||
|
|
||||||
|
@app.route("/data/<key>")
|
||||||
|
def get_data_point(key):
|
||||||
|
if key not in data:
|
||||||
|
return jsonify({"success": False}), 404
|
||||||
|
return jsonify({"success": True, "value": data[key]})
|
||||||
|
|
||||||
@app.route("/admin/")
|
@app.route("/admin/")
|
||||||
def admin():
|
def admin():
|
||||||
return render_template("admin.html", data=data)
|
return render_template("admin.html", data=data)
|
||||||
|
|
Loading…
Reference in New Issue