From 14e064c0d2e0550d9287382e5370a5b81e1366ef Mon Sep 17 00:00:00 2001 From: zhilv Date: Fri, 29 May 2026 11:04:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=AF=BB=E5=8F=96?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E7=9A=84=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 2 +- notify/wechat_company.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 4169a32..f704a94 100644 --- a/main.py +++ b/main.py @@ -31,7 +31,7 @@ async def main(): start_scheduler() - # await SD().push() + await SD().push() # 🔥启动FastAPI Web服务 config = uvicorn.Config("app:app", host="0.0.0.0", port=8000, reload=True) diff --git a/notify/wechat_company.py b/notify/wechat_company.py index 8473b0b..c407e1e 100644 --- a/notify/wechat_company.py +++ b/notify/wechat_company.py @@ -36,7 +36,7 @@ async def upload_file(file_path: str, filename: str = "None") -> str: resp = await client.post(url, files=files, headers=headers) resp.raise_for_status() data = resp.json() - return data.get("path", data.get("files", [None])[0]) + return data.get("data", data.get("files", [None])[0]) async def send_webhook(group_id: str, file_url: str) -> dict: @@ -52,7 +52,6 @@ async def send_webhook(group_id: str, file_url: str) -> dict: """ url = f"{config.WEBHOOK_API_URL}/webhook" headers = { - "Content-Type": "application/json", "Authorization": f"Bearer {config.WEBHOOK_API_TOKEN}", }