Skip to content

Commit cf5706b

Browse files
committed
chore: add missing field from org setting model
1 parent 5d52b5c commit cf5706b

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

internal/api/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ func (a *snykApiClient) GetSastSettings(orgId string) (*sast_contract.SastRespon
249249
}
250250

251251
func (a *snykApiClient) GetOrgSettings(orgId string) (*contract.OrgSettingsResponse, error) {
252-
endpoint := a.url + fmt.Sprintf("/v1/org/%s/settings", url.QueryEscape(orgId))
252+
endpoint := fmt.Sprintf("%s/v1/org/%s/settings", a.url, url.QueryEscape(orgId))
253253
res, err := a.client.Get(endpoint)
254254
if err != nil {
255255
return nil, fmt.Errorf("unable to retrieve org settings: %w", err)

internal/api/contract/OrgSettingsResponse.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ type OrgIgnoreSettings struct {
66
ApprovalWorkflowEnabled bool `json:"approvalWorkflowEnabled,omitempty"`
77
}
88

9+
type OrgRequestAccessSettings struct {
10+
Enabled bool `json:"enabled,omitempty"`
11+
}
12+
913
type OrgSettingsResponse struct {
10-
Ignores OrgIgnoreSettings `json:"ignores"`
14+
Ignores OrgIgnoreSettings `json:"ignores"`
15+
RequestAccess OrgRequestAccessSettings `json:"requestAccess"`
1116
}

0 commit comments

Comments
 (0)