From 0d6c3b5992a6f2d8dce9884eed59f7691c690aca Mon Sep 17 00:00:00 2001 From: Adhityaa Date: Sat, 9 Jun 2018 15:20:01 +0530 Subject: [PATCH] main.go: load SMTP templates --- api/main.go | 1 + api/smtp_templates.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/api/main.go b/api/main.go index 43f8b60..703d621 100644 --- a/api/main.go +++ b/api/main.go @@ -6,6 +6,7 @@ func main() { exitIfError(connectDB()) exitIfError(performMigrations()) exitIfError(smtpConfigure()) + exitIfError(smtpTemplatesLoad()) exitIfError(oauthConfigure()) exitIfError(createMarkdownRenderer()) exitIfError(setupSigintCleanup()) diff --git a/api/smtp_templates.go b/api/smtp_templates.go index 4bbda3d..c360264 100644 --- a/api/smtp_templates.go +++ b/api/smtp_templates.go @@ -17,7 +17,7 @@ type headerPlugs struct { var templates map[string]*template.Template -func loadTemplates() error { +func smtpTemplatesLoad() error { var err error headerTemplate, err = template.New("header").Parse(`MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8