mirror of
https://github.com/StefBuwalda/cal_counter.git
synced 2025-10-30 03:10:00 +00:00
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.
14 lines
196 B
Python
14 lines
196 B
Python
from flask import (
|
|
Blueprint,
|
|
)
|
|
from application.utils import login_required
|
|
|
|
bp = Blueprint(
|
|
"user",
|
|
__name__,
|
|
template_folder="templates",
|
|
)
|
|
|
|
|
|
bp.before_request(login_required)
|