Slash in login route

This commit is contained in:
Candifloss 2025-03-13 09:57:02 +05:30
parent 6ea5ee3e0e
commit de12a966d8

View File

@ -15,7 +15,7 @@ def index():
# Otherwise, redirect to the login page
return redirect(url_for('homepage.login'))
@homepage_bp.route('/login', methods=['GET', 'POST'])
@homepage_bp.route('/login/', methods=['GET', 'POST'])
def login():
# Redirect to /viewall if the user is already logged in
if 'username' in session:
@ -34,7 +34,7 @@ def login():
return render_template('login.html')
@homepage_bp.route('/logout')
@homepage_bp.route('/logout/')
def logout():
# Remove the username from the session
session.pop('username', None)