Skip to content

Commit

Permalink
fix: resolve template loading issue
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Aug 26, 2020
1 parent 4e2acae commit 145fb20
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion courier/template/load_template.go
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/pkg/errors"
)

var _ = pkger.Dir("/courier/template/templates")
var templates = pkger.Dir("/courier/template/templates")

var cache, _ = lru.New(16)

Expand Down
2 changes: 1 addition & 1 deletion courier/template/load_template_test.go
Expand Up @@ -21,7 +21,7 @@ func TestLoadTextTemplate(t *testing.T) {
}

t.Run("method=from bundled", func(t *testing.T) {
actual := executeTemplate(t, "test_stub/email.body.gotmpl")
actual := executeTemplate(t, "/courier/template/templates/test_stub/email.body.gotmpl")
assert.Contains(t, actual, "stub email")
})

Expand Down
2 changes: 1 addition & 1 deletion driver/configuration/provider_viper.go
Expand Up @@ -430,7 +430,7 @@ func (p *ViperProvider) CourierSMTPFrom() string {
}

func (p *ViperProvider) CourierTemplatesRoot() string {
return viperx.GetString(p.l, ViperKeyCourierTemplatesPath, "")
return viperx.GetString(p.l, ViperKeyCourierTemplatesPath, "/courier/template/templates")
}

func mustParseURLFromViper(l *logrusx.Logger, key string) *url.URL {
Expand Down

0 comments on commit 145fb20

Please sign in to comment.