From c514f25ed39ff47e96096376e6006a95b806e6d5 Mon Sep 17 00:00:00 2001
From: 554325746@qq.com <554325746@qq.com>
Date: 星期三, 03 六月 2020 11:56:47 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/webserver

---
 controllers/pollConfig.go |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/controllers/pollConfig.go b/controllers/pollConfig.go
index ffc3258..b676b8f 100644
--- a/controllers/pollConfig.go
+++ b/controllers/pollConfig.go
@@ -122,7 +122,7 @@
 
 type ChannelCountSet struct {
 	PollChannelCount int `json:"pollChannelCount"`
-	FileChannelCount int `json:"fileChannelCount"`
+	VideoChannelCount int `json:"videoChannelCount"`
 }
 
 // @Security ApiKeyAuth
@@ -137,9 +137,13 @@
 // @Router /data/api-v/pollConfig/updateChannelCount [post]
 func (controller PollConfigController) UpdateChannelCount(c *gin.Context) {
 	var argBody ChannelCountSet
-	c.BindJSON(&argBody)
+	err := c.BindJSON(&argBody)
+	if err != nil {
+		util.ResponseFormat(c, code.RequestParamError, "鍙傛暟鏈夎")
+		return
+	}
 	var api dbapi.SysSetApi
-	if api.UpdateChannelCount(argBody.PollChannelCount, argBody.FileChannelCount) {
+	if api.UpdateChannelCount(argBody.PollChannelCount, argBody.VideoChannelCount) {
 		util.ResponseFormat(c,code.UpdateSuccess,"鏇存柊鎴愬姛")
 	} else {
 		util.ResponseFormat(c,code.UpdateFail,"鏇存柊澶辫触")

--
Gitblit v1.8.0