async-fix
All checks were successful
deploy / deploy (push) Successful in 49s

This commit is contained in:
2024-04-19 11:22:57 +03:00
parent 63cf0b9fee
commit 12c5d2677d
3 changed files with 9 additions and 8 deletions

View File

@@ -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)