From 8018a323ebc3352b3cab6256910e1510a1fdfcbd Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期二, 24 十二月 2019 16:32:28 +0800
Subject: [PATCH] add CameraTask.FindAll
---
cameraApi.go | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/cameraApi.go b/cameraApi.go
index 6c77a00..e68f324 100644
--- a/cameraApi.go
+++ b/cameraApi.go
@@ -441,7 +441,7 @@
return true,res.Data
}
-func (api CameraApi) FindAllCameraLink() (bool,interface{}){
+func (api CameraApi) FindAllCameraLink() (b bool,list []protomsg.CameraLink){
url := api.getBasicUrl() + DATA_URL_PREFIX + "/camera/findAllCameraLink"
client := NewClient()
body, err := client.DoGetRequest(url, nil, nil)
@@ -453,5 +453,9 @@
if err = json.Unmarshal(body, &res); err != nil {
return false,nil
}
- return true,res.Data
+ dataBytes, _ := json.Marshal(res.Data)
+ if err := json.Unmarshal(dataBytes, &list);err !=nil {
+ return false,nil
+ }
+ return true,list
}
\ No newline at end of file
--
Gitblit v1.8.0