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('.')