Skip to content

Commit efb94c6

Browse files
jnaheloudenouche
authored andcommitted
fix(credentials): wrong API endpoint #29 and wrong credential type attribute name
1 parent 3e7a621 commit efb94c6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

client/credentials.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type ListCredentialsResponse struct {
1919
const credentialsAPIEndpoint = "/api/v2/credentials/"
2020

2121
func (cs *CredentialsService) ListCredentials(params map[string]string) ([]*Credential, error) {
22-
results, err := cs.getAllPages(organizationsAPIEndpoint, params)
22+
results, err := cs.getAllPages(credentialsAPIEndpoint, params)
2323
if err != nil {
2424
return nil, err
2525
}

client/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ type Credential struct {
287287
Kind string `json:"kind"`
288288
Name string `json:"name"`
289289
OrganizationID int `json:"organization"`
290-
CredentialTypeID int `json:"credential_type_id"`
290+
CredentialTypeID int `json:"credential_type"`
291291
Inputs map[string]interface{} `json:"inputs"`
292292
SummaryFields map[string]interface{} `json:"summary_fields"`
293293
}

0 commit comments

Comments
 (0)