diff --git a/internal/cli/branding.go b/internal/cli/branding.go index 5c4573fe3..5010123be 100644 --- a/internal/cli/branding.go +++ b/internal/cli/branding.go @@ -84,8 +84,8 @@ func brandingCmd(cli *cli) *cobra.Command { cmd.AddCommand(showBrandingCmd(cli)) cmd.AddCommand(updateBrandingCmd(cli)) cmd.AddCommand(templateCmd(cli)) - cmd.AddCommand(emailTemplateCmd(cli)) cmd.AddCommand(textsCmd(cli)) + return cmd } @@ -117,19 +117,6 @@ Once you close the window, you’ll be asked if you want to save the template. I return cmd } -func emailTemplateCmd(cli *cli) *cobra.Command { - cmd := &cobra.Command{ - Use: "emails", - Short: "Manage custom email templates", - Long: "Manage custom email templates. This requires a custom email provider to be configured for the tenant.", - } - - cmd.SetUsageTemplate(resourceUsageTemplate()) - cmd.AddCommand(showEmailTemplateCmd(cli)) - cmd.AddCommand(updateEmailTemplateCmd(cli)) - return cmd -} - func showBrandingCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "show", diff --git a/internal/cli/email.go b/internal/cli/email.go new file mode 100644 index 000000000..3206c8da6 --- /dev/null +++ b/internal/cli/email.go @@ -0,0 +1,17 @@ +package cli + +import ( + "github.com/spf13/cobra" +) + +func emailCmd(cli *cli) *cobra.Command { + cmd := &cobra.Command{ + Use: "email", + Short: "Manage email settings", + Long: "Manage email settings.", + } + + cmd.AddCommand(emailTemplateCmd(cli)) + + return cmd +} diff --git a/internal/cli/email_templates.go b/internal/cli/email_templates.go index 951178c0e..ab05228f0 100644 --- a/internal/cli/email_templates.go +++ b/internal/cli/email_templates.go @@ -96,6 +96,19 @@ var ( } ) +func emailTemplateCmd(cli *cli) *cobra.Command { + cmd := &cobra.Command{ + Use: "templates", + Short: "Manage custom email templates", + Long: "Manage custom email templates. This requires a custom email provider to be configured for the tenant.", + } + + cmd.SetUsageTemplate(resourceUsageTemplate()) + cmd.AddCommand(showEmailTemplateCmd(cli)) + cmd.AddCommand(updateEmailTemplateCmd(cli)) + return cmd +} + func showEmailTemplateCmd(cli *cli) *cobra.Command { var inputs struct { Template string @@ -106,8 +119,8 @@ func showEmailTemplateCmd(cli *cli) *cobra.Command { Args: cobra.MaximumNArgs(1), Short: "Show an email template", Long: "Show an email template.", - Example: `auth0 branding emails show