From 9169334afe5385ad41286a99cfd68a6a8fe89e22 Mon Sep 17 00:00:00 2001 From: liuxiaolong <736321739@qq.com> Date: 星期三, 04 十二月 2019 15:05:04 +0800 Subject: [PATCH] update protomsg and fix GetPollConfig --- controllers/pollConfig.go | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/controllers/pollConfig.go b/controllers/pollConfig.go index 8b4c52d..ffc3258 100644 --- a/controllers/pollConfig.go +++ b/controllers/pollConfig.go @@ -78,9 +78,15 @@ // @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, "鏌ヨ澶辫触") } @@ -119,6 +125,7 @@ FileChannelCount int `json:"fileChannelCount"` } +// @Security ApiKeyAuth // @Summary 璁剧疆杞绠楀姏鍜屾湰鍦扮畻鍔涚殑鏁伴噺 // @Description 璁剧疆杞绠楀姏鍜屾湰鍦扮畻鍔涚殑鏁伴噺 // @Accept json -- Gitblit v1.8.0