feat 🐛:1

main
许标 6 months ago
parent aa007d885e
commit 2b83fc86d3

@ -101,7 +101,7 @@ async def poll_external_api():
# data 参数用于表单字段files 参数用于文件 # data 参数用于表单字段files 参数用于文件
for name in config_data["user_group"]: for name in config_data["user_group"]:
data = { data = {
"message": "文档", "message": "",
"contactName": name "contactName": name
} }
async with httpx.AsyncClient() as client: async with httpx.AsyncClient() as client:

@ -16,7 +16,7 @@ class DataLoader:
print(f"current fileop.py path: {file_path}") print(f"current fileop.py path: {file_path}")
if DataLoader._data is None: if DataLoader._data is None:
try: try:
with open(file_path, "r") as file: with open(file_path, "r", encoding='utf-8') as file:
DataLoader._data = json.load(file) DataLoader._data = json.load(file)
except FileNotFoundError: except FileNotFoundError:
raise HTTPException(status_code=500, detail="File not found") raise HTTPException(status_code=500, detail="File not found")

Loading…
Cancel
Save