Dashboard setzt Session-Daten beim Start automatisch zurück
This commit is contained in:
parent
7b726ad830
commit
053f0d3721
1 changed files with 6 additions and 0 deletions
|
|
@ -24,6 +24,11 @@ def speichere_fuellwoerter(woerter):
|
||||||
with open(FUELLWOERTER_DATEI, "w", encoding="utf-8") as f:
|
with open(FUELLWOERTER_DATEI, "w", encoding="utf-8") as f:
|
||||||
json.dump(woerter, f, ensure_ascii=False, indent=2)
|
json.dump(woerter, f, ensure_ascii=False, indent=2)
|
||||||
|
|
||||||
|
def reset_session_daten():
|
||||||
|
with open(DATEN_DATEI, "w", encoding="utf-8") as f:
|
||||||
|
json.dump({"status": "wartend", "sessions": [], "fehler": None}, f, ensure_ascii=False, indent=2)
|
||||||
|
print("--- Dashboard gestartet – Session-Daten zurückgesetzt ---")
|
||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
def index():
|
def index():
|
||||||
daten = lade_daten()
|
daten = lade_daten()
|
||||||
|
|
@ -65,4 +70,5 @@ def fuellwort_entfernen(wort):
|
||||||
return redirect(url_for("index"))
|
return redirect(url_for("index"))
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
reset_session_daten()
|
||||||
app.run(host="0.0.0.0", port=5000, debug=True, threaded=True)
|
app.run(host="0.0.0.0", port=5000, debug=True, threaded=True)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue