inbox
This commit is contained in:
@@ -10,7 +10,7 @@ INTERNAL_AUTH_SERVER = "v2.discours" in AUTH_URL or "testapi.discours" in AUTH_U
|
||||
async def check_auth(req):
|
||||
token = req.headers.get("Authorization")
|
||||
print(f"[services.auth] checking auth token: {token}")
|
||||
|
||||
|
||||
query_name = "getSession" if INTERNAL_AUTH_SERVER else "session"
|
||||
query_type = "mutation" if INTERNAL_AUTH_SERVER else "query"
|
||||
operation = "GetUserId"
|
||||
@@ -23,7 +23,7 @@ async def check_auth(req):
|
||||
gql = {
|
||||
"query": query_type + " " + operation + " { " + query_name + " { user { id } } " + " }",
|
||||
"operationName": operation,
|
||||
"variables": "{}"
|
||||
"variables": None
|
||||
}
|
||||
|
||||
async with AsyncClient() as client:
|
||||
|
Reference in New Issue
Block a user