add Docker Client API地址

This commit is contained in:
jxxghp
2025-05-25 14:55:51 +08:00
parent ac941968cb
commit 39de89254f
7 changed files with 127 additions and 117 deletions

View File

@@ -395,10 +395,6 @@ def save_plugin_folders(folders: dict, _: schemas.TokenPayload = Depends(get_cur
"""
try:
SystemConfigOper().set(SystemConfigKey.PluginFolders, folders)
# 验证保存结果
saved_result = SystemConfigOper().get(SystemConfigKey.PluginFolders)
return schemas.Response(success=True)
except Exception as e:
logger.error(f"[文件夹API] 保存文件夹配置失败: {str(e)}")

View File

@@ -36,8 +36,8 @@ from app.schemas.types import SystemConfigKey
from app.utils.crypto import HashUtils
from app.utils.http import RequestUtils
from app.utils.security import SecurityUtils
from app.utils.system import SystemUtils
from app.utils.url import UrlUtils
from helper.system import SystemHelper
from version import APP_VERSION
router = APIRouter()
@@ -474,12 +474,12 @@ def restart_system(_: User = Depends(get_current_active_superuser)):
"""
重启系统(仅管理员)
"""
if not SystemUtils.can_restart():
if not SystemHelper.can_restart():
return schemas.Response(success=False, message="当前运行环境不支持重启操作!")
# 标识停止事件
global_vars.stop_system()
# 执行重启
ret, msg = SystemUtils.restart()
ret, msg = SystemHelper.restart()
return schemas.Response(success=ret, message=msg)