From 89321bfe39e5a696abdb8ad5372d01e64ea6e2e7 Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期一, 16 十一月 2020 17:54:43 +0800
Subject: [PATCH] 退出集群添加参数
---
voiceApi.go | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/voiceApi.go b/voiceApi.go
index 57c2b9c..2043436 100644
--- a/voiceApi.go
+++ b/voiceApi.go
@@ -25,20 +25,20 @@
}
//鏌ユ壘鎵�鏈夌畻娉�
-func (api VoiceApi) FindAll()[]protomsg.Voice{
+func (api VoiceApi) FindAll() (bool, []protomsg.Voice) {
var voiceArr []protomsg.Voice
url := api.getBasicUrl() + DATA_URL_PREFIX + "/voice/findAll"
client := NewClient()
respBody, err := client.DoGetRequest(url, nil, nil)
if err !=nil {
- return voiceArr
+ return false, nil
}
var res Result
if err = json.Unmarshal(respBody, &res); err != nil {
logPrint(err)
- return voiceArr
+ return false, nil
}
bytes, _ := json.Marshal(res.Data)
err = json.Unmarshal(bytes, &voiceArr)
- return voiceArr
+ return res.Success, voiceArr
}
\ No newline at end of file
--
Gitblit v1.8.0