fix
liuxiaolong
2021-06-04 e2c3330eb73157ece61f487e6aa96e222fac63c8
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 {