From 11e6edde0df9b11a317aac4ef92f50d483b4db72 Mon Sep 17 00:00:00 2001 From: Sivaanand Murugesan Date: Fri, 26 Jul 2024 14:44:46 +0530 Subject: [PATCH] commented swith org --- client/organization.go | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/client/organization.go b/client/organization.go index 90689222..1e349ac8 100644 --- a/client/organization.go +++ b/client/organization.go @@ -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) { - 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 }