This commit is contained in:
parent
50016c0ba7
commit
1ca23cc159
|
@ -165,7 +165,9 @@ async def load_authors_all(_, _info, limit: int = 50, offset: int = 0):
|
|||
async def get_author_id(_, _info, user: str):
|
||||
with local_session() as session:
|
||||
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")
|
||||
|
|
|
@ -71,7 +71,7 @@ def login_required(f):
|
|||
context = info.context
|
||||
# print(context)
|
||||
req = context.get("request")
|
||||
print(f"[services.auth] request: {req}")
|
||||
print(f"[services.auth] request headers: {req.headers}")
|
||||
# Performing authentication check
|
||||
is_authenticated, user_id = await check_auth(req)
|
||||
if not is_authenticated:
|
||||
|
|
Loading…
Reference in New Issue
Block a user