This repository has been archived on 2025-10-24. You can view files and clone it, but cannot push or open issues or pull requests.
Files
RIS/App/checker.py
2024-10-22 01:39:48 +03:00

11 lines
293 B
Python

from flask import redirect, url_for, session
from functools import wraps
def check_auth(func):
@wraps(func)
def wrapper(*args, **kwargs):
if 'user_id' not in session:
return redirect(url_for('auth_bp.auth'))
return func(*args, **kwargs)
return wrapper