From 790f84dd6e70fc8a0c94bea2ba0761729d45061a Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期三, 13 一月 2021 11:46:43 +0800
Subject: [PATCH] 添加delUser
---
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