Cleanip init.py, utils.py and decorators.py

This commit is contained in:
2025-04-17 13:59:42 +02:00
parent 3b0bc856e9
commit 235072af97
5 changed files with 22 additions and 8 deletions

View File

@@ -4,6 +4,9 @@ from functools import wraps
from flask import redirect, url_for
# Decorator that checks if the current user is logged in and an admin
# Could be shortened by adding the login_required decorator
# and removing the logic here
def admin_required(f: Callable[..., Any]) -> Callable[..., Any]:
@wraps(f)
def decorated_function(*args: ..., **kwargs: ...):