From d201f9ac33a1f764cf0d6827aa961c6f804a87bb Mon Sep 17 00:00:00 2001 From: vladhanzha Date: Thu, 17 Oct 2024 18:42:12 +0300 Subject: [PATCH] Fix get route perfomance --- cloudconnexa/routes.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cloudconnexa/routes.go b/cloudconnexa/routes.go index 74c113e..88126c0 100644 --- a/cloudconnexa/routes.go +++ b/cloudconnexa/routes.go @@ -91,11 +91,10 @@ func (c *RoutesService) Get(routeId string) (*Route, error) { } for _, n := range networks { - routes, err := c.List(n.Id) if err != nil { continue } - for _, r := range routes { + for _, r := range n.Routes { if r.Id == routeId { r.NetworkItemId = n.Id return &r, nil