mirror of
https://git.wownero.com/wownero/YellWOWPages.git
synced 2024-08-15 01:03:25 +00:00
14 lines
306 B
Python
14 lines
306 B
Python
|
from quart import session, abort
|
||
|
|
||
|
from functools import wraps
|
||
|
|
||
|
|
||
|
def login_required(func):
|
||
|
@wraps(func)
|
||
|
async def wrapper(*args, **kwargs):
|
||
|
user = session.get('user')
|
||
|
if not isinstance(user, dict):
|
||
|
abort(403)
|
||
|
return await func(*args, **kwargs)
|
||
|
return wrapper
|