This commit is contained in:
parent
2184fcf1f9
commit
7d0268ec52
|
@ -7,16 +7,13 @@ from settings import AUTH_URL
|
||||||
async def check_auth(req):
|
async def check_auth(req):
|
||||||
token = req.headers.get("Authorization")
|
token = req.headers.get("Authorization")
|
||||||
print(f"[services.auth] checking auth token: {token}")
|
print(f"[services.auth] checking auth token: {token}")
|
||||||
|
query_name = "getSession"
|
||||||
query_name = "session"
|
|
||||||
query_type = "query"
|
|
||||||
operation = "GetUserId"
|
|
||||||
|
|
||||||
headers = {"Authorization": token, "Content-Type": "application/json"}
|
headers = {"Authorization": token, "Content-Type": "application/json"}
|
||||||
|
# query getSession($params: SessionQueryInput){ session(params: $params) { message user { id } } }
|
||||||
gql = {
|
gql = {
|
||||||
"query": query_type + " " + operation + " { " + query_name + " { user { id } } " + " }",
|
"query": f"query {query_name}($params: SessionQueryInput)"
|
||||||
"operationName": operation,
|
+ "{ session(params: $params) { message user { id } } }",
|
||||||
|
"operationName": "GetSession",
|
||||||
"variables": None,
|
"variables": None,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user