refactor(enterprise/cli): replace deprecated GroupsByOrganization in groups list (#30142)

`coder groups list` called the deprecated `GroupsByOrganization`.
It now calls `Groups` with `GroupArguments{Organization: ...}`.

**Behavior change:** None.
`GroupsByOrganization` already wraps the same call, so the request and
response are identical.

Closes [CLI-24](https://linear.app/codercom/issue/CLI-24)

_This PR was generated by Coder Agents on behalf of @nickvigilante._
This commit is contained in:
Nick Vigilante
2026-09-30 15:27:06 -04:00
committed by GitHub
parent 191a9f3d3a
commit 1f7aa2d14c
+1 -1
View File
@@ -38,7 +38,7 @@ func (r *RootCmd) groupList() *serpent.Command {
return xerrors.Errorf("current organization: %w", err)
}
groups, err := client.GroupsByOrganization(ctx, org.ID)
groups, err := client.Groups(ctx, codersdk.GroupArguments{Organization: org.ID.String()})
if err != nil {
return xerrors.Errorf("get groups: %w", err)
}