优化
This commit is contained in:
@@ -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{}, "自动创建数据库成功")
|
||||
|
||||
Reference in New Issue
Block a user