From 2ab81d2ce5fc366c685f23c1716aeba1cf01f101 Mon Sep 17 00:00:00 2001 From: Devang Gaur Date: Tue, 30 Jul 2024 20:14:31 +0530 Subject: [PATCH] remove /v1/auth/org/{orgName}/switch endpoint --- client/organization.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/client/organization.go b/client/organization.go index 90689222..2bb12da1 100644 --- a/client/organization.go +++ b/client/organization.go @@ -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 -}