| | |
| | | // @Router /data/api-v/pollConfig/getPollConfig [get] |
| | | func (controller PollConfigController) GetPollConfig(c *gin.Context) { |
| | | var api dbapi.SysSetApi |
| | | b, data := api.GetPollConfig() |
| | | b, d := api.GetPollConfig() |
| | | if b { |
| | | util.ResponseFormat(c, code.Success, data) |
| | | util.ResponseFormat(c, code.Success, map[string]interface{}{ |
| | | "server_id": d.ServerId, |
| | | "poll_period": d.PollPeriod, |
| | | "delay": d.Delay, |
| | | "enable": d.Enable, |
| | | "pollChannelCount": d.PollChannelCount, |
| | | }) |
| | | } else { |
| | | util.ResponseFormat(c, code.ComError, "查询失败") |
| | | } |