mirror of
https://git.wownero.com/wownero/YellWOWPages.git
synced 2024-08-15 01:03:25 +00:00
Rewrite to Quart web-framework, refactor code.
This commit is contained in:
parent
6b300fd304
commit
67f4c34604
39 changed files with 656 additions and 980 deletions
13
yellow/__init__.py
Normal file
13
yellow/__init__.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
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
|
Loading…
Add table
Add a link
Reference in a new issue