From e06566c3fc2c9a8917411484894d595d2a64a4ba Mon Sep 17 00:00:00 2001 From: jingrow Date: Wed, 29 Oct 2025 20:38:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=86=97=E4=BD=99=E7=9A=84?= =?UTF-8?q?=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/jingrow/jingrow/services/whitelist.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/apps/jingrow/jingrow/services/whitelist.py b/apps/jingrow/jingrow/services/whitelist.py index 170def3..a89f9a5 100644 --- a/apps/jingrow/jingrow/services/whitelist.py +++ b/apps/jingrow/jingrow/services/whitelist.py @@ -136,19 +136,10 @@ async def _process_whitelist_call(request: Request, full_module_path: str): @router.api_route("/{module_path:path}", methods=["GET", "POST", "PUT", "DELETE"]) async def handle_request(request: Request, module_path: str): """ - 兼容旧路径:直接传入完整点分路径 '' + 直接传入完整点分路径 '' """ return await _process_whitelist_call(request, module_path) - -@router.api_route("/{app}/{module_path:path}", methods=["GET", "POST", "PUT", "DELETE"]) -async def handle_request_with_app_prefix(request: Request, app: str, module_path: str): - """ - 新路径:支持以 app 作为前缀,例如 app.module.function - """ - full_module_path = f"{app}.{module_path}" - return await _process_whitelist_call(request, full_module_path) - def parse_module_path(module_path: str) -> Dict[str, str]: """解析模块路径""" parts = module_path.split('.')