This commit is contained in:
@@ -60,7 +60,7 @@ def login_required(f):
|
||||
info = args[1]
|
||||
context = info.context
|
||||
req = context.get("request")
|
||||
user_id, user_roles = await check_auth(req)
|
||||
user_id, user_roles = await check_auth(req)
|
||||
if user_id and isinstance(user_id, str):
|
||||
context["user_id"] = user_id.strip()
|
||||
author = await get_author_by_user(user_id)
|
||||
@@ -77,7 +77,7 @@ def auth_request(f):
|
||||
@wraps(f)
|
||||
async def decorated_function(*args, **kwargs):
|
||||
req = args[0]
|
||||
user_id, user_roles = await check_auth(req)
|
||||
user_id, user_roles = await check_auth(req)
|
||||
if user_id and isinstance(user_id, str):
|
||||
user_id = user_id.strip()
|
||||
author = await get_author_by_user(user_id)
|
||||
|
Reference in New Issue
Block a user