From 5c29a654741a14d42a678ddce776565393b70d0c Mon Sep 17 00:00:00 2001 From: Michael Quigley Date: Wed, 11 Dec 2024 13:01:40 -0500 Subject: [PATCH] slightly more ergonomic CLI ordering (#537) --- cmd/zrok/adminCreateOrgMember.go | 6 +++--- cmd/zrok/adminDeleteOrgMember.go | 6 +++--- docs/guides/self-hosting/organizations.md | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cmd/zrok/adminCreateOrgMember.go b/cmd/zrok/adminCreateOrgMember.go index fc15e3a1..e58c2fcd 100644 --- a/cmd/zrok/adminCreateOrgMember.go +++ b/cmd/zrok/adminCreateOrgMember.go @@ -18,7 +18,7 @@ type adminCreateOrgMemberCommand struct { func newAdminCreateOrgMemberCommand() *adminCreateOrgMemberCommand { cmd := &cobra.Command{ - Use: "org-member ", + Use: "org-member ", Aliases: []string{"member"}, Short: "Add an account to an organization", Args: cobra.ExactArgs(2), @@ -41,8 +41,8 @@ func (cmd *adminCreateOrgMemberCommand) run(_ *cobra.Command, args []string) { } req := admin.NewAddOrganizationMemberParams() - req.Body.Email = args[0] - req.Body.Token = args[1] + req.Body.Token = args[0] + req.Body.Email = args[1] req.Body.Admin = cmd.admin _, err = zrok.Admin.AddOrganizationMember(req, mustGetAdminAuth()) diff --git a/cmd/zrok/adminDeleteOrgMember.go b/cmd/zrok/adminDeleteOrgMember.go index 81c38fe2..6659727f 100644 --- a/cmd/zrok/adminDeleteOrgMember.go +++ b/cmd/zrok/adminDeleteOrgMember.go @@ -17,7 +17,7 @@ type adminDeleteOrgMemberCommand struct { func newAdminDeleteOrgMemberCommand() *adminDeleteOrgMemberCommand { cmd := &cobra.Command{ - Use: "org-member ", + Use: "org-member ", Aliases: []string{"member"}, Short: "Remove an account from an organization", Args: cobra.ExactArgs(2), @@ -39,8 +39,8 @@ func (cmd *adminDeleteOrgMemberCommand) run(_ *cobra.Command, args []string) { } req := admin.NewRemoveOrganizationMemberParams() - req.Body.Email = args[0] - req.Body.Token = args[1] + req.Body.Token = args[0] + req.Body.Email = args[1] _, err = zrok.Admin.RemoveOrganizationMember(req, mustGetAdminAuth()) if err != nil { diff --git a/docs/guides/self-hosting/organizations.md b/docs/guides/self-hosting/organizations.md index 6a000498..f67b215a 100644 --- a/docs/guides/self-hosting/organizations.md +++ b/docs/guides/self-hosting/organizations.md @@ -64,7 +64,7 @@ We use the `zrok admin create org-member` command to add members to organization $ zrok admin create org-member Error: accepts 2 arg(s), received 0 Usage: - zrok admin create org-member [flags] + zrok admin create org-member [flags] Aliases: org-member, member @@ -81,7 +81,7 @@ Global Flags: Like this: ``` -$ zrok admin create org-member michael.quigley@netfoundry.io gK1XRvthq7ci +$ zrok admin create org-member gK1XRvthq7ci michael.quigley@netfoundry.io [ 0.006] INFO main.(*adminCreateOrgMemberCommand).run: added 'michael.quigley@netfoundry.io' to organization 'gK1XRvthq7ci ```