From 77a045a5d0a65d490fd1cc7b901eb9aec1f28635 Mon Sep 17 00:00:00 2001 From: WahidinAji Date: Tue, 26 Sep 2023 22:15:04 +0700 Subject: [PATCH] push without test locally. wish me luck --- backend/main.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/main.go b/backend/main.go index 58026e2..abcba30 100644 --- a/backend/main.go +++ b/backend/main.go @@ -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{ @@ -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)