Skip to content

Commit

Permalink
Update examples for auth0 email templates cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiught committed Dec 2, 2022
1 parent 8289feb commit 2b14fd2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
13 changes: 0 additions & 13 deletions internal/cli/branding.go
Original file line number Diff line number Diff line change
Expand Up @@ -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: "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 showBrandingCmd(cli *cli) *cobra.Command {
cmd := &cobra.Command{
Use: "show",
Expand Down
21 changes: 17 additions & 4 deletions internal/cli/email_templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 <template>
auth0 branding emails show welcome`,
Example: `auth0 email templates show <template>
auth0 email templates show welcome`,
RunE: func(cmd *cobra.Command, args []string) error {
if len(args) == 0 {
err := emailTemplateTemplate.Pick(cmd, &inputs.Template, cli.emailTemplatePickerOptions)
Expand Down Expand Up @@ -152,8 +165,8 @@ func updateEmailTemplateCmd(cli *cli) *cobra.Command {
Args: cobra.MaximumNArgs(1),
Short: "Update an email template",
Long: "Update an email template.",
Example: `auth0 branding emails update <template>
auth0 branding emails update welcome`,
Example: `auth0 email templates update <template>
auth0 email templates update welcome`,
RunE: func(cmd *cobra.Command, args []string) error {
if len(args) > 0 {
inputs.Template = args[0]
Expand Down

0 comments on commit 2b14fd2

Please sign in to comment.