From 432652e9d1dc668526bdd57ddf0c6060659c65d1 Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Sat, 17 Dec 2016 06:11:18 -0800 Subject: testing API based reference --- system/api/server.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'system') diff --git a/system/api/server.go b/system/api/server.go index 7254a7b..c6d29bf 100644 --- a/system/api/server.go +++ b/system/api/server.go @@ -19,13 +19,13 @@ func Run() { } // ContentAll retrives all items from the HTTP API within the provided namespace -func ContentAll(namespace string) [][]bytes { +func ContentAll(namespace string) [][]byte { endpoint := "http://0.0.0.0:8080/api/contents?type=" buf := []byte{} r := bytes.NewReader(buf) req, err := http.NewRequest(http.MethodGet, endpoint+namespace, r) if err != nil { - log.Println("Error creating request for reference from:", contentType) + log.Println("Error creating request for reference from:", namespace) return nil } @@ -34,5 +34,6 @@ func ContentAll(namespace string) [][]bytes { fmt.Println(res, string(buf)) - return []byte{buf} + ret := [][]byte{} + return append(ret, buf) } -- cgit v1.2.3