优化
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"kra/internal/biz"
|
||||
"kra/internal/server/httpx"
|
||||
"kra/internal/service"
|
||||
"kra/internal/service/dto"
|
||||
@@ -67,10 +64,6 @@ func (h *SystemConfig) Set(c *gin.Context) {
|
||||
|
||||
func (h *SystemConfig) Reload(c *gin.Context) {
|
||||
if err := h.system.ReloadConfig(c.Request.Context()); err != nil {
|
||||
if errors.Is(err, biz.ErrTaskRuntimeReload) {
|
||||
httpx.Fail(c, "系统配置已重载,但定时任务重载失败:"+err.Error())
|
||||
return
|
||||
}
|
||||
httpx.Fail(c, "重载系统失败:"+err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user