Skip to content

Commit

Permalink
push without test locally. wish me luck
Browse files Browse the repository at this point in the history
  • Loading branch information
WahidinAji committed Sep 26, 2023
1 parent b1dee25 commit 77a045a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions backend/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,11 +399,6 @@ func App() *cli.App {
HtmlBody: string(htmlContent),
}

// Execute handlebars template only if user.Name is not empty
if user.Name != "" {
mail.PlainTextBody = plaintextTemplate.MustExec(map[string]any{"name": user.Name})
mail.HtmlBody = htmlTemplate.MustExec(map[string]any{"name": user.Name})
}

// Parse email template information
emailTemplate := map[string]any{
Expand All @@ -417,6 +412,11 @@ func App() *cli.App {
"conferenceEmail": config.EmailTemplate.ConferenceEmail,
"bankAccounts": config.EmailTemplate.BankAccounts,
}
// Execute handlebars template only if user.Name is not empty
if user.Name != "" {
emailTemplate["name"] = user.Name
}


mail.PlainTextBody = plaintextTemplate.MustExec(emailTemplate)
mail.HtmlBody = htmlTemplate.MustExec(emailTemplate)
Expand Down

0 comments on commit 77a045a

Please sign in to comment.