diff --git a/dashboard.py b/dashboard.py index 705c3dc..d00b5d2 100644 --- a/dashboard.py +++ b/dashboard.py @@ -24,6 +24,11 @@ def speichere_fuellwoerter(woerter): with open(FUELLWOERTER_DATEI, "w", encoding="utf-8") as f: 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("/") def index(): daten = lade_daten() @@ -65,4 +70,5 @@ def fuellwort_entfernen(wort): return redirect(url_for("index")) if __name__ == "__main__": + reset_session_daten() app.run(host="0.0.0.0", port=5000, debug=True, threaded=True)