diff --git a/app.py b/app.py index 89f3826..fb41760 100644 --- a/app.py +++ b/app.py @@ -220,6 +220,13 @@ def admin_login(): return redirect("/admin") +@app.route("/logout") +def admin_logout(): + session.clear() + flash("Logged out", "info") + return redirect("/") + + @app.route("/dashboard") def admin_dashboard(): if "username" in session: diff --git a/templates/dashboard.html b/templates/dashboard.html index d5bd32e..bde547c 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -6,7 +6,7 @@