Browse Source

增加了 配置管理功能

main
pixel 5 years ago
parent
commit
35661ff735
  1. 20
      QMPlusServer/controller/api/sys_system.go

20
QMPlusServer/controller/api/sys_system.go

@ -22,7 +22,6 @@ func GetSystemConfig(c *gin.Context) {
}
}
// @Tags system
// @Summary 设置配置文件内容
// @Security ApiKeyAuth
@ -40,22 +39,3 @@ func SetSystemConfig(c *gin.Context) {
servers.ReportFormat(c, true, "设置成功", gin.H{})
}
}
// @Tags system
// @Summary 设置配置文件内容
// @Security ApiKeyAuth
// @Produce application/json
// @Param data body sysModel.System true
// @Success 200 {string} string "{"success":true,"data":{},"msg":"返回成功"}"
// @Router /system/ReloadSystem [post]
func ReloadSystem(c *gin.Context) {
var sys sysModel.System
_ = c.ShouldBind(&sys)
err := sys.SetSystemConfig()
if err != nil {
servers.ReportFormat(c, false, fmt.Sprintf("设置失败:%v", err), gin.H{})
} else {
servers.ReportFormat(c, true, "设置成功", gin.H{})
}
}
Loading…
Cancel
Save