This commit is contained in:
2026-08-16 01:19:10 +08:00
parent c4b114762b
commit c554152f4f
43 changed files with 1311 additions and 318 deletions
+1 -5
View File
@@ -123,11 +123,7 @@ func (h *Public) InitializeDatabase(engine *gin.Engine) gin.HandlerFunc {
values = append(values, dto.Route{Path: route.Path, Method: route.Method})
}
if err := h.system.InitializeRoutes(c.Request.Context(), &input, values); err != nil {
if errors.Is(err, biz.ErrTaskRuntimeReload) {
httpx.Fail(c, "数据库已初始化,但定时任务加载失败:"+err.Error())
return
}
httpx.Fail(c, "自动创建数据库失败: "+err.Error())
httpx.Fail(c, "自动创建数据库失败,请查看后台日志,检查后在进行初始化")
return
}
httpx.Write(c, httpx.CodeSuccess, gin.H{}, "自动创建数据库成功")