Skip to content

Commit

Permalink
Fix vnet get param to get route for ip
Browse files Browse the repository at this point in the history
  • Loading branch information
vavsab committed Jun 1, 2022
1 parent 0657062 commit f16d34c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tunnel_routes.go
Expand Up @@ -57,8 +57,8 @@ type TunnelRoutesUpdateParams struct {
}

type TunnelRoutesForIPParams struct {
AccountID string `json:"-"`
Network string `json:"-"`
AccountID string `url:"-"`
Network string `url:"-"`
VirtualNetworkID string `url:"virtual_network_id,omitempty"`
}

Expand Down Expand Up @@ -118,9 +118,9 @@ func (api *API) GetTunnelRouteForIP(ctx context.Context, params TunnelRoutesForI
return TunnelRoute{}, ErrInvalidNetworkValue
}

uri := fmt.Sprintf("/%s/%s/teamnet/routes/ip/%s", AccountRouteRoot, params.AccountID, params.Network)
uri := buildURI(fmt.Sprintf("/%s/%s/teamnet/routes/ip/%s", AccountRouteRoot, params.AccountID, params.Network), params)

responseBody, err := api.makeRequestContext(ctx, http.MethodGet, uri, params)
responseBody, err := api.makeRequestContext(ctx, http.MethodGet, uri, nil)
if err != nil {
return TunnelRoute{}, err
}
Expand Down

0 comments on commit f16d34c

Please sign in to comment.