11 lines
319 B
Python
11 lines
319 B
Python
from flask import render_template, redirect, url_for, session, request
|
|
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 |