diff --git a/apps/jingrow/jingrow/services/whitelist.py b/apps/jingrow/jingrow/services/whitelist.py index 03813d8..8f23d89 100644 --- a/apps/jingrow/jingrow/services/whitelist.py +++ b/apps/jingrow/jingrow/services/whitelist.py @@ -10,8 +10,8 @@ from fastapi.responses import JSONResponse import importlib from typing import Any, Dict import logging -from jingrow import get_whitelisted_function, is_whitelisted -from jingrow.utils.auth import get_jingrow_api_headers, get_session_api_headers +from jingrow import get_whitelisted_function +from jingrow.utils.auth import get_jingrow_api_headers from jingrow.utils.jingrow_api import get_logged_user from jingrow.utils.app_manager import ensure_apps_on_sys_path @@ -116,24 +116,6 @@ async def handle_request(request: Request, module_path: str): """ return await _process_whitelist_call(request, module_path) -def parse_module_path(module_path: str) -> Dict[str, str]: - """解析模块路径""" - parts = module_path.split('.') - - if len(parts) < 2: - raise ValueError("Invalid module path format") - - # 最后一部分是函数名 - function_name = parts[-1] - - # 其余部分是模块路径 - module_path = '.'.join(parts[:-1]) - - return { - 'module_path': module_path, - 'function_name': function_name - } - def import_module(module_path: str): """动态导入模块""" try: