DSatishchandra commited on
Commit
674e2fc
·
verified ·
1 Parent(s): 480f204

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -72,6 +72,11 @@ def login():
72
  return render_template("login.html", error=f"Error: {str(e)}")
73
  return render_template("login.html")
74
 
 
 
 
 
 
75
  @app.route("/menu", methods=["GET", "POST"])
76
  def menu():
77
  selected_category = request.args.get("category", "All")
 
72
  return render_template("login.html", error=f"Error: {str(e)}")
73
  return render_template("login.html")
74
 
75
+ @app.route("/logout", methods=["POST"])
76
+ def logout():
77
+ session.clear() # Clears the session to log the user out
78
+ return redirect(url_for('login')) # Redirect to the login page
79
+
80
  @app.route("/menu", methods=["GET", "POST"])
81
  def menu():
82
  selected_category = request.args.get("category", "All")