summaryrefslogtreecommitdiff
path: root/system/api/server.go
diff options
context:
space:
mode:
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
}