fix: 安装后设置全局配置,提示重启容器
Build and Deploy / build (push) Failing after 1m51s
Build and Deploy / deploy (push) Has been skipped

This commit is contained in:
2026-07-16 19:00:10 +00:00
parent a6b03a6152
commit 84cac4ea77
+6 -1
View File
@@ -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": "请重启容器以完成安装",
})
}