From 1fe6f8cd2d5fa3a37ac02c5af9b449f64112587a Mon Sep 17 00:00:00 2001 From: Sergiu Ghitea Date: Fri, 2 Dec 2022 14:06:12 +0100 Subject: [PATCH] Bring branding emails command under email templates --- internal/cli/branding.go | 4 ++-- internal/cli/email.go | 17 +++++++++++++++++ internal/cli/root.go | 1 + 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 internal/cli/email.go diff --git a/internal/cli/branding.go b/internal/cli/branding.go index 5c4573fe3..c05da7d3d 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 } @@ -119,7 +119,7 @@ Once you close the window, you’ll be asked if you want to save the template. I func emailTemplateCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ - Use: "emails", + Use: "templates", Short: "Manage custom email templates", Long: "Manage custom email templates. This requires a custom email provider to be configured for the tenant.", } 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/root.go b/internal/cli/root.go index c6e53a308..6191a0085 100644 --- a/internal/cli/root.go +++ b/internal/cli/root.go @@ -177,6 +177,7 @@ func addSubcommands(rootCmd *cobra.Command, cli *cli) { rootCmd.AddCommand(rolesCmd(cli)) rootCmd.AddCommand(organizationsCmd(cli)) rootCmd.AddCommand(brandingCmd(cli)) + rootCmd.AddCommand(emailCmd(cli)) rootCmd.AddCommand(customDomainsCmd(cli)) rootCmd.AddCommand(ipsCmd(cli)) rootCmd.AddCommand(quickstartsCmd(cli))