Skip to content

Commit

Permalink
GetInternetExchanges returns a list of pointers
Browse files Browse the repository at this point in the history
This is to maintain consistency with other methods of the Client.

Signed-off-by: Dimitrios Karagiannis <[email protected]>
  • Loading branch information
alkar committed Oct 18, 2019
1 parent 005c7a9 commit 1e0f976
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions megaport/api/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,14 @@ func (c *Client) GetMegaports() ([]*Megaport, error) {
return data, nil
}

func (c *Client) GetInternetExchanges(locationId uint64) ([]InternetExchange, error) {
func (c *Client) GetInternetExchanges(locationId uint64) ([]*InternetExchange, error) {
v := url.Values{}
v.Set("locationId", strconv.FormatUint(locationId, 10))
req, err := http.NewRequest(http.MethodGet, fmt.Sprintf("%s/v2/product/ix/types?%s", c.BaseURL, v.Encode()), nil)
if err != nil {
return nil, err
}
data := []InternetExchange{}
data := []*InternetExchange{}
if err := c.do(req, &data); err != nil {
return nil, err
}
Expand Down

0 comments on commit 1e0f976

Please sign in to comment.