This commit is contained in:
parent
a442119495
commit
6134b02c4a
|
@ -8,12 +8,12 @@ async def check_auth(req):
|
||||||
headers = {"Authorization": token, "Content-Type": "application/json"} # "Bearer " + removed
|
headers = {"Authorization": token, "Content-Type": "application/json"} # "Bearer " + removed
|
||||||
print(f"[services.auth] checking auth token: {token}")
|
print(f"[services.auth] checking auth token: {token}")
|
||||||
|
|
||||||
query_name = "getSession" if "v2." in AUTH_URL else "session"
|
query_name = "session"
|
||||||
query_type = "mutation" if "v2." in AUTH_URL else "query"
|
query_type = "query"
|
||||||
operation = "GetUserId"
|
operation = "GetUserId"
|
||||||
|
|
||||||
gql = {
|
gql = {
|
||||||
"query": query_type + " " + operation + " { " + query_name + " { user { id } } " + " }",
|
"query": query_type + " " + operation + " { " + query_name + " { user { id } } }",
|
||||||
"operationName": operation,
|
"operationName": operation,
|
||||||
"variables": None,
|
"variables": None,
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ class RedisCache:
|
||||||
|
|
||||||
async def listen(self, channel):
|
async def listen(self, channel):
|
||||||
pubsub = self._client.pubsub()
|
pubsub = self._client.pubsub()
|
||||||
pubsub.subscribe(channel)
|
await pubsub.subscribe(channel)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
message = pubsub.get_message()
|
message = pubsub.get_message()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user