New Year revamp #40

Merged
FrederikBaerentsen merged 31 commits from gregoo/BrickTracker:master into master 2025-01-19 08:19:01 +01:00
Showing only changes of commit 6b62a1f89b - Show all commits

View File

@ -3,6 +3,7 @@ import logging
from flask import (
Blueprint,
current_app,
g,
redirect,
render_template,
request,
@ -27,7 +28,11 @@ login_page = Blueprint('login', __name__)
# Index
@login_page.route('/login', methods=['GET'])
@exception_handler(__file__)
def login() -> str:
def login() -> str | Response:
# Do not log if logged in
if g.login.is_authenticated():
return redirect(url_for('index.index'))
return render_template(
'login.html',
next=request.args.get('next'),