11 lines
291 B
Python
11 lines
291 B
Python
from flask import redirect, url_for, session
|
|
from functools import wraps
|
|
|
|
|
|
def check_auth(func):
|
|
@wraps(func)
|
|
def wrapper(*args, **kwargs):
|
|
if 'login' not in session:
|
|
return redirect(url_for('auth_bp.auth'))
|
|
return func(*args, **kwargs)
|
|
return wrapper |