From 8fbe16f00beb94975a76e6a6c8ab4d1206d488be Mon Sep 17 00:00:00 2001 From: Tomer Heber Date: Tue, 19 Nov 2024 16:36:30 -0600 Subject: [PATCH] update team get by name --- client/team.go | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/client/team.go b/client/team.go index 25c44b4a..f329303f 100644 --- a/client/team.go +++ b/client/team.go @@ -94,18 +94,5 @@ func (client *ApiClient) Teams() ([]Team, error) { } func (client *ApiClient) TeamsByName(name string) ([]Team, error) { - organizationId, err := client.OrganizationId() - if err != nil { - return nil, err - } - - var result []Team - - if err := client.http.Get("/teams/organizations/"+organizationId, map[string]string{ - "name": name, - }, &result); err != nil { - return nil, err - } - - return result, nil + return client.GetTeams(map[string]string{"name": name}) }