summaryrefslogtreecommitdiff
path: root/system/api/server.go
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-12-17 06:39:43 -0800
committerSteve Manuel <nilslice@gmail.com>2016-12-17 06:39:43 -0800
commit547c1bb8d9240ff5a531890bda193ce0a17edff1 (patch)
treec7cd108f04a2607a6e44766d1736d4c189534c56 /system/api/server.go
parent8b9d19d5a7212d3e0d493ad6a0570434f9049b43 (diff)
editing server and reference
Diffstat (limited to 'system/api/server.go')
-rw-r--r--system/api/server.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/system/api/server.go b/system/api/server.go
index c6d29bf..d663fe4 100644
--- a/system/api/server.go
+++ b/system/api/server.go
@@ -19,7 +19,7 @@ func Run() {
}
// ContentAll retrives all items from the HTTP API within the provided namespace
-func ContentAll(namespace string) [][]byte {
+func ContentAll(namespace string) []byte {
endpoint := "http://0.0.0.0:8080/api/contents?type="
buf := []byte{}
r := bytes.NewReader(buf)
@@ -31,9 +31,9 @@ func ContentAll(namespace string) [][]byte {
c := http.Client{}
res, err := c.Do(req)
+ defer res.Body.Close()
fmt.Println(res, string(buf))
- ret := [][]byte{}
- return append(ret, buf)
+ return buf
}