Skip to content

Commit

Permalink
Fix get route perfomance
Browse files Browse the repository at this point in the history
  • Loading branch information
vladhanzha committed Oct 17, 2024
1 parent 6ef86a4 commit d201f9a
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 d201f9a

Please sign in to comment.