Skip to content

Commit

Permalink
commented swith org
Browse files Browse the repository at this point in the history
  • Loading branch information
SivaanandM committed Jul 26, 2024
1 parent aa60d15 commit 11e6edd
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions client/organization.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,15 @@ func (h *V1Client) ListOrganizations() ([]*models.V1Organization, error) {
// SwitchOrganization switches the caller's active organization.
// Returns an authorization token for the target organization.
func (h *V1Client) SwitchOrganization(orgName string) (string, error) {

Check failure on line 31 in client/organization.go

View workflow job for this annotation

GitHub Actions / build-with-coverage

unused-parameter: parameter 'orgName' seems to be unused, consider removing or renaming it as _ (revive)
params := clientv1.NewV1AuthOrgSwitchParamsWithContext(h.ctx).
WithOrgName(orgName)
resp, err := h.Client.V1AuthOrgSwitch(params)
if err != nil || resp == nil {
return "", err
}
return resp.Payload.Authorization, nil

// Need to update this fix , currently HAPI restricted `V1AuthOrgSwitch`

//params:= clientv1.NewV1AuthOrgSwitchParamsWithContext(h.ctx).
// WithOrgName(orgName)
//resp, err := h.Client.V1AuthOrgSwitch(params)
//if err != nil || resp == nil {
// return "", err
//}
//return resp.Payload.Authorization, nil
return "", nil
}

0 comments on commit 11e6edd

Please sign in to comment.