debug-gql
All checks were successful
deploy / deploy (push) Successful in 1m32s

This commit is contained in:
Untone 2023-12-14 00:10:34 +03:00
parent 2518e0357b
commit 8fb2764bc1

View File

@ -26,7 +26,7 @@ async def check_auth(req) -> (bool, int | None):
"query": f"query ValidateToken($params: ValidateJWTTokenInput!) {{ {query_name}(params: $params) {{ is_valid claims }} }}",
"variables": variables,
}
print(f"[services.auth] Graphql: {gql}")
try:
# Asynchronous HTTP request to the authentication server
async with aiohttp.ClientSession() as session:
@ -67,7 +67,7 @@ def login_required(f):
async def decorated_function(*args, **kwargs):
info = args[1]
context = info.context
print(context)
# print(context)
req = context.get("request")
# Performing authentication check
is_authenticated, user_id = await check_auth(req)