Files
cal_counter/application/admin/routes.py
Stef 18fa0fdb2d Remove admin food item and barcode test routes and templates
Deleted the /food_items and /barcode_test routes from admin, along with their associated templates and the delete_food functionality. This streamlines the admin blueprint by removing unused or deprecated features.
2025-08-11 16:56:40 +02:00

16 lines
284 B
Python

from flask import Blueprint, abort
from flask_login import current_user
admin_bp = Blueprint(
"admin",
__name__,
url_prefix="/admin",
template_folder="templates",
)
@admin_bp.before_request
def admin_required():
if not current_user.is_admin:
abort(403)