Skip to content

Commit

Permalink
someone was an idiot (#17)
Browse files Browse the repository at this point in the history
Signed-off-by: Lasse Gaardsholt <lasse.gaardsholt@bestseller.com>
  • Loading branch information
Gaardsholt authored Feb 9, 2023
1 parent 22f2b13 commit ffcbedb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ func (client *Client) SendRequest(method string, path string, payload interface{
return "", err
}

baseUrl = baseUrl.JoinPath("api")
if err != nil {
return "", err
}

url := fmt.Sprintf("%s/%s", baseUrl.String(), path)

httpClient := &http.Client{}
Expand Down
2 changes: 1 addition & 1 deletion provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func Provider() terraform.ResourceProvider {
}

func providerConfigure(d *schema.ResourceData) (interface{}, error) {
endpoint := d.Get("endpoint").(string) + "api"
endpoint := d.Get("endpoint").(string)
apiToken := d.Get("api_token").(string)

return client.NewClient(endpoint, apiToken), nil
Expand Down

0 comments on commit ffcbedb

Please sign in to comment.