mirror of
https://git.wownero.com/lza_menace/suchwow.git
synced 2024-08-15 01:03:19 +00:00
11 lines
No EOL
328 B
Python
11 lines
No EOL
328 B
Python
from flask import session, redirect, url_for
|
|
from functools import wraps
|
|
|
|
|
|
def login_required(f):
|
|
@wraps(f)
|
|
def decorated_function(*args, **kwargs):
|
|
if "auth" not in session or not session["auth"]:
|
|
return redirect(url_for("auth.login"))
|
|
return f(*args, **kwargs)
|
|
return decorated_function |