From b64bb2dd19cba5c16774fc52c943743d9f136b94 Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期一, 01 二月 2021 11:14:21 +0800
Subject: [PATCH] GetAllCamerasByServer添加cameraId参数

---
 voiceApi.go |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/voiceApi.go b/voiceApi.go
index b5bcc11..8297558 100644
--- a/voiceApi.go
+++ b/voiceApi.go
@@ -46,13 +46,13 @@
 func (api VoiceApi) Add(id,name,mp3File,g711aFile string) (bool, interface{}) {
 	url := api.getBasicUrl() + DATA_URL_PREFIX + "/voice/add"
 	client := NewClient()
-    paramBody := map[string]string{
+    paramBody := map[string]interface{}{
         "id": id,
         "name": name,
         "mp3File": mp3File,
         "g711aFile": g711aFile,
     }
-	respBody, err := client.DoPostRequest(url,CONTENT_TYPE_FORM, paramBody, nil, nil, nil)
+	respBody, err := client.DoPostRequest(url,CONTENT_TYPE_FORM, paramBody, nil, nil)
 	if err !=nil {
 		return false, nil
 	}
@@ -65,12 +65,12 @@
 }
 
 func (api VoiceApi) Del(id string) (bool, interface{}) {
-   url := api.getBasicUrl() + DATA_URL_PREFIX + "/voice/add"
+    url := api.getBasicUrl() + DATA_URL_PREFIX + "/voice/del"
     client := NewClient()
-    paramQuery := map[string]string{
+    paramQuery := map[string]string {
         "id": id,
     }
-    respBody, err := client.DoDeleteRequest(url,paramQuery, nil, nil)
+    respBody, err := client.DoDeleteRequest(url,CONTENT_TYPE_FORM, nil, paramQuery, nil)
     if err !=nil {
         return false, nil
     }

--
Gitblit v1.8.0