Permalink
Browse files

Remove default values for mail template paths

  • Loading branch information...
brycekahle committed Sep 5, 2017
1 parent 0f42595 commit e6d1cea4e08685f7bd8fecd9cd7fa454affa2870
Showing with 6 additions and 19 deletions.
  1. +4 −4 README.md
  2. +0 −13 conf/configuration.go
  3. +2 −2 mailer/mailer_test.go
View
@@ -222,7 +222,7 @@ Email subject to use for email change confirmation. Defaults to `Confirm Email C
`MAILER_TEMPLATES_INVITE` - `string`
URL path to an email template to use when inviting a user. Defaults to `/.netlify/gotrue/templates/invite.html`
URL path to an email template to use when inviting a user.
`SiteURL`, `Email`, and `ConfirmationURL` variables are available.
Default Content (if template is unavailable):
@@ -235,7 +235,7 @@ Default Content (if template is unavailable):
`MAILER_TEMPLATES_CONFIRMATION` - `string`
URL path to an email template to use when confirming a signup. Defaults to `/.netlify/gotrue/templates/confirm.html`
URL path to an email template to use when confirming a signup.
`SiteURL`, `Email`, and `ConfirmationURL` variables are available.
Default Content (if template is unavailable):
@@ -248,7 +248,7 @@ Default Content (if template is unavailable):
`MAILER_TEMPLATES_RECOVERY` - `string`
URL path to an email template to use when resetting a password. Defaults to `/.netlify/gotrue/templates/recover.html`
URL path to an email template to use when resetting a password.
`SiteURL`, `Email`, and `ConfirmationURL` variables are available.
Default Content (if template is unavailable):
@@ -261,7 +261,7 @@ Default Content (if template is unavailable):
`MAILER_TEMPLATES_EMAIL_CHANGE` - `string`
URL path to an email template to use when confirming the change of an email address. Defaults to `/.netlify/gotrue/templates/email-change.html`
URL path to an email template to use when confirming the change of an email address.
`SiteURL`, `Email`, `NewEmail`, and `ConfirmationURL` variables are available.
Default Content (if template is unavailable):
View
@@ -151,19 +151,6 @@ func (config *Configuration) ApplyDefaults() {
config.JWT.Exp = 3600
}
if config.Mailer.Templates.Invite == "" {
config.Mailer.Templates.Invite = "/.netlify/gotrue/templates/invite.html"
}
if config.Mailer.Templates.Confirmation == "" {
config.Mailer.Templates.Confirmation = "/.netlify/gotrue/templates/confirm.html"
}
if config.Mailer.Templates.Recovery == "" {
config.Mailer.Templates.Recovery = "/.netlify/gotrue/templates/recover.html"
}
if config.Mailer.Templates.EmailChange == "" {
config.Mailer.Templates.EmailChange = "/.netlify/gotrue/templates/email-change.html"
}
if config.Mailer.URLPaths.Invite == "" {
config.Mailer.URLPaths.Invite = "/"
}
View
@@ -13,8 +13,8 @@ func TestGetSiteURL(t *testing.T) {
Fragment string
Expected string
}{
{"https://test.example.com", "/.netlify/gotrue/templates/confirm.html", "", "https://test.example.com/.netlify/gotrue/templates/confirm.html"},
{"https://test.example.com/removedpath", "/.netlify/gotrue/templates/confirm.html", "", "https://test.example.com/.netlify/gotrue/templates/confirm.html"},
{"https://test.example.com", "/templates/confirm.html", "", "https://test.example.com/templates/confirm.html"},
{"https://test.example.com/removedpath", "/templates/confirm.html", "", "https://test.example.com/templates/confirm.html"},
{"https://test.example.com/", "/trailingslash/", "", "https://test.example.com/trailingslash/"},
{"https://test.example.com", "f", "fragment", "https://test.example.com/f#fragment"},
}

0 comments on commit e6d1cea

Please sign in to comment.