Refactor login_required and add auth blueprint

Moved the login_required logic to a new utils.py for reuse. Added a new auth blueprint and registered it in app.py. Updated user blueprint to use the shared login_required function.
This commit is contained in:
2025-08-11 17:33:47 +02:00
parent cd9ae72864
commit ea2ea27d9e
4 changed files with 28 additions and 4 deletions

View File

@@ -0,0 +1,13 @@
from flask import (
Blueprint,
)
from application.utils import login_required
bp = Blueprint(
"user",
__name__,
template_folder="templates",
)
bp.before_request(login_required)