dep-fix-2
All checks were successful
deploy / deploy (push) Successful in 1m33s

This commit is contained in:
Untone 2023-12-13 23:54:38 +03:00
parent 2fb48d76b6
commit 2518e0357b

View File

@ -38,6 +38,10 @@ async def check_auth(req) -> (bool, int | None):
if response.status == 200: if response.status == 200:
# Parsing JSON response # Parsing JSON response
data = await response.json() data = await response.json()
errors = data.get("errors")
if errors:
print(f"Auth connector errors: {errors}")
else:
user_id = data.get("data", {}).get(query_name, {}).get("claims", {}).get("sub") user_id = data.get("data", {}).get(query_name, {}).get("claims", {}).get("sub")
if user_id: if user_id: