diff --git a/api/api.go b/api/api.go index 8981f5f..a3ab77e 100644 --- a/api/api.go +++ b/api/api.go @@ -89,7 +89,7 @@ func (h *httpHandler) initRouter() { {"/networks/" + nwID, nil, procGetNetwork}, {"/networks/" + nwID + "/endpoints", []string{"name", epName}, procGetEndpoints}, {"/networks/" + nwID + "/endpoints", []string{"partial-id", epPID}, procGetEndpoints}, - + {"/networks/" + nwID + "/endpoints", nil, procGetEndpoints}, {"/networks/" + nwID + "/endpoints/" + epID, nil, procGetEndpoint}, }, "POST": { diff --git a/api/api_test.go b/api/api_test.go index 416cebb..cb35ecf 100644 --- a/api/api_test.go +++ b/api/api_test.go @@ -1391,8 +1391,8 @@ func TestEndToEnd(t *testing.T) { t.Fatal(err) } handleRequest(rsp, req) - if rsp.statusCode != http.StatusNotFound { - t.Fatalf("Expected StatusNotFound. Got (%d): %s", rsp.statusCode, rsp.body) + if rsp.statusCode != http.StatusOK { + t.Fatalf("Expected StatusOK. Got (%d): %s", rsp.statusCode, rsp.body) } req, err = http.NewRequest("GET", "/networks/"+nid+"/endpoints?name=bla", nil)