From b16570fb1cba711fe10f9dc62722ac80736df08f Mon Sep 17 00:00:00 2001 From: jingrow Date: Wed, 29 Oct 2025 23:55:27 +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 | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) 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: