🎨 更新项目版本
This commit is contained in:
@@ -55,19 +55,20 @@ func (s *SystemApi) SetSystemConfig(c *gin.Context) {
|
||||
|
||||
// ReloadSystem
|
||||
// @Tags System
|
||||
// @Summary 重启系统
|
||||
// @Summary 重载系统
|
||||
// @Security ApiKeyAuth
|
||||
// @Produce application/json
|
||||
// @Success 200 {object} response.Response{msg=string} "重启系统"
|
||||
// @Success 200 {object} response.Response{msg=string} "重载系统"
|
||||
// @Router /system/reloadSystem [post]
|
||||
func (s *SystemApi) ReloadSystem(c *gin.Context) {
|
||||
err := utils.Reload()
|
||||
// 触发系统重载事件
|
||||
err := utils.GlobalSystemEvents.TriggerReload()
|
||||
if err != nil {
|
||||
global.GVA_LOG.Error("重启系统失败!", zap.Error(err))
|
||||
response.FailWithMessage("重启系统失败", c)
|
||||
global.GVA_LOG.Error("重载系统失败!", zap.Error(err))
|
||||
response.FailWithMessage("重载系统失败:"+err.Error(), c)
|
||||
return
|
||||
}
|
||||
response.OkWithMessage("重启系统成功", c)
|
||||
response.OkWithMessage("重载系统成功", c)
|
||||
}
|
||||
|
||||
// GetServerInfo
|
||||
|
Reference in New Issue
Block a user