Skip to content

Commit

Permalink
Update provider.go
Browse files Browse the repository at this point in the history
  • Loading branch information
akmal-spacelift authored Sep 18, 2024
1 parent 0e6bd08 commit 467f4b7
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions spacelift/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,8 @@ func buildClientFromAPIKeyData(d *schema.ResourceData) (*internal.Client, error)
// Since validation runs first, we can safely assume that the data is there.

// Handle / at api_key_endpoint
endpoint := d.Get("api_key_endpoint").(string)
if endpoint[len(api_key_endpoint)-1:] == "/" {
endpoint = fmt.Sprintf("%sgraphql", endpoint)
} else {
endpoint = fmt.Sprintf("%s/graphql", endpoint)
}
endpoint := strings.TrimSuffix(d.Get("api_key_endpoint").(string), "/")
endpiont = fmt.Sprintf("%s/graphql", endpoint)

Check failure on line 231 in spacelift/provider.go

View workflow job for this annotation

GitHub Actions / Check documentation

undefined: endpiont

apiKeyID := d.Get("api_key_id").(string)
apiKeySecret := d.Get("api_key_secret").(string)
Expand Down

0 comments on commit 467f4b7

Please sign in to comment.