This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from typing import Any, List
|
||||
|
||||
import aiohttp
|
||||
|
||||
from aiohttp import ClientResponse, ClientSession
|
||||
from models.member import ChatMember
|
||||
from settings import API_BASE
|
||||
|
||||
@@ -53,10 +53,10 @@ async def get_my_followed() -> List[ChatMember]:
|
||||
"variables": None,
|
||||
}
|
||||
|
||||
async with aiohttp.ClientSession() as client:
|
||||
async with ClientSession() as client:
|
||||
try:
|
||||
response = await client.post(API_BASE, headers=headers, json=gql)
|
||||
print(f"[services.core] {query_name}: [{response.status_code}] {len(response.text)} bytes")
|
||||
response: ClientResponse = await client.post(API_BASE, headers=headers, json=gql)
|
||||
print(f"[services.core] {query_name}: [{response.status}] {len(response.text)} bytes")
|
||||
if response.status_code != 200:
|
||||
return []
|
||||
r = response.json()
|
||||
|
Reference in New Issue
Block a user