Skip to content

Commit

Permalink
update team get by name
Browse files Browse the repository at this point in the history
  • Loading branch information
TomerHeber committed Nov 19, 2024
1 parent bacca6c commit f11ffc1
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion client/team.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,18 @@ func (client *ApiClient) Teams() ([]Team, error) {
}

func (client *ApiClient) TeamsByName(name string) ([]Team, error) {
return client.GetTeams(map[string]string{"name": name})
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
}

0 comments on commit f11ffc1

Please sign in to comment.