From 84cac4ea77d281fb38f870b915a044fda8767126 Mon Sep 17 00:00:00 2001 From: Admin Date: Thu, 16 Jul 2026 19:00:10 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=89=E8=A3=85=E5=90=8E=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=85=A8=E5=B1=80=E9=85=8D=E7=BD=AE=EF=BC=8C=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E9=87=8D=E5=90=AF=E5=AE=B9=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/server/main.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/server/main.go b/cmd/server/main.go index e1357b3..482be25 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -164,6 +164,9 @@ func handleInstall(c *gin.Context) { return } + // 设置全局配置 + config.Cfg = cfg + // 初始化数据库 if err := database.Init(&cfg.Database); err != nil { c.JSON(500, gin.H{"error": "数据库初始化失败: " + err.Error()}) @@ -177,7 +180,9 @@ func handleInstall(c *gin.Context) { } c.JSON(200, gin.H{ - "message": "安装成功", + "message": "安装成功", + "restart": true, + "restartMsg": "请重启容器以完成安装", }) }