This commit is contained in:
@@ -63,7 +63,7 @@ def login_required(f):
|
||||
user_id, user_roles = await check_auth(req)
|
||||
if user_id and isinstance(user_id, str):
|
||||
context["user_id"] = user_id.strip()
|
||||
author = get_author_by_user(user_id)
|
||||
author = await get_author_by_user(user_id)
|
||||
if author and "id" in author:
|
||||
context["author_id"] = author["id"]
|
||||
return await f(*args, **kwargs)
|
||||
@@ -80,7 +80,7 @@ def auth_request(f):
|
||||
user_id, user_roles = await check_auth(req)
|
||||
if user_id and isinstance(user_id, str):
|
||||
user_id = user_id.strip()
|
||||
author = get_author_by_user(user_id)
|
||||
author = await get_author_by_user(user_id)
|
||||
if author and "id" in author:
|
||||
req["author_id"] = author["id"]
|
||||
return await f(*args, **kwargs)
|
||||
|
Reference in New Issue
Block a user