From e2c3330eb73157ece61f487e6aa96e222fac63c8 Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期五, 04 六月 2021 15:45:30 +0800
Subject: [PATCH] fix
---
deviceCtlApi.go | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/deviceCtlApi.go b/deviceCtlApi.go
index 5967550..b4eed99 100644
--- a/deviceCtlApi.go
+++ b/deviceCtlApi.go
@@ -9,10 +9,10 @@
}
-func (api DeviceCtlApi) DevAuthApply(devId string, ip string, key string) (bool,interface{}) {
+func (api DeviceCtlApi) DevAuthApply(targetIp string, fromDevId string, fromIp string, key string) (bool,interface{}) {
url := DATA_URL_PREFIX + "/devAuth/apply"
dest := &bhome_msg.BHAddress{
- Ip: []byte(ip),
+ Ip: []byte(targetIp),
}
netNode := append([]*bhome_msg.MsgQueryTopicReply_BHNodeAddress{}, &bhome_msg.MsgQueryTopicReply_BHNodeAddress{
Addr: dest,
@@ -20,9 +20,9 @@
client := NewClient(WithNodes(netNode))
paramBody := map[string]interface{} {
- "key": key,
- "fromDevId": devId,
- "fromIp": ip,
+ "key": key,
+ "fromDevId": fromDevId,
+ "fromIp": fromIp,
}
body,err := client.DoPutRequest(url,CONTENT_TYPE_JSON, paramBody,nil)
if err != nil {
--
Gitblit v1.8.0