Skip to content

Commit

Permalink
Merge pull request #37 from vladhss/feature/fix-get-route-perfomance
Browse files Browse the repository at this point in the history
Fix get route performance
  • Loading branch information
sahaqaa authored Oct 17, 2024
2 parents 6ef86a4 + d201f9a commit d1634d4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cloudconnexa/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d1634d4

Please sign in to comment.