dumnps-fix

This commit is contained in:
Untone 2023-10-11 16:41:01 +03:00
parent 4992d3e312
commit 0c73f376a2

View File

@ -1,3 +1,4 @@
import json
from functools import wraps from functools import wraps
from httpx import AsyncClient, HTTPError from httpx import AsyncClient, HTTPError
from settings import AUTH_URL from settings import AUTH_URL
@ -17,7 +18,7 @@ async def check_auth(req):
headers = {"Authorization": token, "Content-Type": "application/json"} headers = {"Authorization": token, "Content-Type": "application/json"}
async with AsyncClient() as client: async with AsyncClient() as client:
response = await client.post(AUTH_URL, headers=headers, data=json.dumps(gql)) response = await client.post(AUTH_URL, headers=headers, data=json.dumps(gql))
print(f"{response}") print(f"{response.text}")
if response.status_code != 200: if response.status_code != 200:
return False, None return False, None
r = response.json() r = response.json()