Skip to content

Commit

Permalink
remove /v1/auth/org/{orgName}/switch endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
devang-gaur committed Jul 30, 2024
1 parent 462f7d1 commit 2ab81d2
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions client/organization.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,3 @@ func (h *V1Client) ListOrganizations() ([]*models.V1Organization, error) {
}
return resp.Payload.Organizations, nil
}

// SwitchOrganization switches the caller's active organization.
// Returns an authorization token for the target organization.
func (h *V1Client) SwitchOrganization(orgName string) (string, error) {
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
}

0 comments on commit 2ab81d2

Please sign in to comment.