author-debug
All checks were successful
deploy / deploy (push) Successful in 1m35s

This commit is contained in:
Untone 2023-12-15 16:59:03 +03:00
parent 50016c0ba7
commit 1ca23cc159
2 changed files with 4 additions and 2 deletions

View File

@ -165,7 +165,9 @@ async def load_authors_all(_, _info, limit: int = 50, offset: int = 0):
async def get_author_id(_, _info, user: str): async def get_author_id(_, _info, user: str):
with local_session() as session: with local_session() as session:
print(f"[resolvers.author] getting author id for {user}") print(f"[resolvers.author] getting author id for {user}")
return session.query(Author).where(Author.user == user).first() a = session.query(Author).filter(Author.user == user).first()
print(f"[resolvers.author] got {a}")
return a
@query.field("get_author") @query.field("get_author")

View File

@ -71,7 +71,7 @@ def login_required(f):
context = info.context context = info.context
# print(context) # print(context)
req = context.get("request") req = context.get("request")
print(f"[services.auth] request: {req}") print(f"[services.auth] request headers: {req.headers}")
# Performing authentication check # Performing authentication check
is_authenticated, user_id = await check_auth(req) is_authenticated, user_id = await check_auth(req)
if not is_authenticated: if not is_authenticated: