From cc9d7e2dfad7c634e8ce69d02ce5fc4065e809e4 Mon Sep 17 00:00:00 2001 From: liuxiaolong <liuxiaolong@aiotlink.com> Date: 星期日, 25 四月 2021 11:34:47 +0800 Subject: [PATCH] 使用bhsgo by lichao --- chanmanageApi.go | 15 --------------- 1 files changed, 0 insertions(+), 15 deletions(-) diff --git a/chanmanageApi.go b/chanmanageApi.go index 6281c7e..3a031e6 100644 --- a/chanmanageApi.go +++ b/chanmanageApi.go @@ -13,9 +13,6 @@ func (api ChanManageApi) SavePollPeriod(period int) (bool,interface{}){ url := DATA_URL_PREFIX + "/pollConfig/savePollPeriod" netNode := getNetNode(url2Topic(Topic_Chanmanage_Service, url)) - if netNode == nil { - return false,nil - } client := NewClient(WithNodes(netNode)) paramBody := make(map[string]interface{},0) paramBody["period"] = period @@ -36,9 +33,6 @@ func (api ChanManageApi) SavePollDelay(delay int) (bool,interface{}){ url := DATA_URL_PREFIX + "/pollConfig/savePollDelay" netNode := getNetNode(url2Topic(Topic_Chanmanage_Service, url)) - if netNode == nil { - return false,nil - } client := NewClient(WithNodes(netNode)) paramBody := make(map[string]interface{},0) paramBody["delay"] = delay @@ -60,9 +54,6 @@ func (api ChanManageApi) GetPollConfig() (flag bool,config protomsg.PollConfig) { url := DATA_URL_PREFIX + "/pollConfig/getPollConfig" netNode := getNetNode(url2Topic(Topic_Chanmanage_Service, url)) - if netNode == nil { - return false,config - } client := NewClient(WithNodes(netNode)) body, err := client.DoGetRequest(url, nil, nil) @@ -95,9 +86,6 @@ func (api ChanManageApi) UpdatePollEnable(enable bool) bool{ url := DATA_URL_PREFIX + "/pollConfig/updateEnable" netNode := getNetNode(url2Topic(Topic_Chanmanage_Service, url)) - if netNode == nil { - return false - } client := NewClient(WithNodes(netNode)) paramBody :=make(map[string]interface{},0) paramBody["enable"] = enable @@ -117,9 +105,6 @@ func (api ChanManageApi) UpdateChannelCount(pollChannelCount int, videoChannelCount int) bool{ url := DATA_URL_PREFIX + "/pollConfig/updateChannelCount" netNode := getNetNode(url2Topic(Topic_Chanmanage_Service, url)) - if netNode == nil { - return false - } client := NewClient(WithNodes(netNode)) paramBody :=make(map[string]interface{},0) paramBody["pollChannelCount"] = pollChannelCount -- Gitblit v1.8.0