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