From f8faddd7c24e893b78c5056dc59a6220c9f5060d Mon Sep 17 00:00:00 2001 From: liuwei Date: Wed, 23 Apr 2025 11:59:14 +0800 Subject: [PATCH] =?UTF-8?q?server=E5=90=AF=E5=8A=A8=E4=B9=8B=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E5=A1=AB=E5=85=A5callback?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gewechat/api/callback.py | 2 +- gewechat/config.toml | 2 +- main.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gewechat/api/callback.py b/gewechat/api/callback.py index aa799c2..c263b28 100644 --- a/gewechat/api/callback.py +++ b/gewechat/api/callback.py @@ -17,7 +17,7 @@ def register_robot(appid, robot_instance): logger.info(f"已注册appid为{appid}的Robot实例") -@router.post("/gewechat/callback") +@router.post("/gewechat/message/callback") async def callback(request: Request): """接收微信消息回调""" try: diff --git a/gewechat/config.toml b/gewechat/config.toml index 6f11ba8..61ebd4d 100644 --- a/gewechat/config.toml +++ b/gewechat/config.toml @@ -2,4 +2,4 @@ base_url= "http://192.168.2.240:2531/v2/api" gewechat_token= "cb43f52db27e4a56bb6ec7da54373582" app_id="wx_3BC6eSHGE5xEm_hH3__7c" -callback_url="http://192.168.2.210:8999/gewechat/callback" +callback_url="http://192.168.2.210:8999/gewechat/message/callback" diff --git a/main.py b/main.py index 808f03c..f1727b0 100644 --- a/main.py +++ b/main.py @@ -52,9 +52,9 @@ def main(chat_type: int): # # # 秀人网每天自动发pdf # robot.onEveryTime("17:30", robot.xiu_ren_pdf_send) - # time.sleep(5) - # # 启动之后,填入callback - # gewe_client.client_set_callback() + time.sleep(5) + # 启动之后,填入callback + gewe_client.client_set_callback() # 返回启动的端口,以便调用者知道实际使用的端口 # 启动Dashboard服务器 dashboard_server = None