server启动之后,填入callback

This commit is contained in:
liuwei
2025-04-23 11:59:14 +08:00
parent 17a88a4757
commit f8faddd7c2
3 changed files with 5 additions and 5 deletions

View File

@@ -17,7 +17,7 @@ def register_robot(appid, robot_instance):
logger.info(f"已注册appid为{appid}的Robot实例") logger.info(f"已注册appid为{appid}的Robot实例")
@router.post("/gewechat/callback") @router.post("/gewechat/message/callback")
async def callback(request: Request): async def callback(request: Request):
"""接收微信消息回调""" """接收微信消息回调"""
try: try:

View File

@@ -2,4 +2,4 @@
base_url= "http://192.168.2.240:2531/v2/api" base_url= "http://192.168.2.240:2531/v2/api"
gewechat_token= "cb43f52db27e4a56bb6ec7da54373582" gewechat_token= "cb43f52db27e4a56bb6ec7da54373582"
app_id="wx_3BC6eSHGE5xEm_hH3__7c" 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"

View File

@@ -52,9 +52,9 @@ def main(chat_type: int):
# #
# # 秀人网每天自动发pdf # # 秀人网每天自动发pdf
# robot.onEveryTime("17:30", robot.xiu_ren_pdf_send) # robot.onEveryTime("17:30", robot.xiu_ren_pdf_send)
# time.sleep(5) time.sleep(5)
# # 启动之后填入callback # 启动之后填入callback
# gewe_client.client_set_callback() gewe_client.client_set_callback()
# 返回启动的端口,以便调用者知道实际使用的端口 # 返回启动的端口,以便调用者知道实际使用的端口
# 启动Dashboard服务器 # 启动Dashboard服务器
dashboard_server = None dashboard_server = None