diff --git a/src/hmnurl/urls.go b/src/hmnurl/urls.go index 9a7cbd17..17071c60 100644 --- a/src/hmnurl/urls.go +++ b/src/hmnurl/urls.go @@ -49,6 +49,13 @@ func BuildWhenIsIt() string { return Url("/whenisit", nil) } +var RegexNewsletterSignup = regexp.MustCompile("^/newsletter$") + +func BuildNewsletterSignup() string { + defer CatchPanic() + return Url("/newsletter", nil) +} + var RegexJamsIndex = regexp.MustCompile("^/jams$") func BuildJamsIndex() string { diff --git a/src/website/routes.go b/src/website/routes.go index 3ff6ffc4..ee00a4f0 100644 --- a/src/website/routes.go +++ b/src/website/routes.go @@ -55,6 +55,9 @@ func NewWebsiteRoutes(conn *pgxpool.Pool) http.Handler { hmnOnly.GET(hmnurl.RegexProjectSubmissionGuidelines, ProjectSubmissionGuidelines) hmnOnly.GET(hmnurl.RegexConferences, Conferences) hmnOnly.GET(hmnurl.RegexWhenIsIt, WhenIsIt) + hmnOnly.GET(hmnurl.RegexNewsletterSignup, func(c *RequestContext) ResponseData { + return c.Redirect("https://cdn.forms-content.sg-form.com/9c83182a-f04a-11ed-a42d-f6f307313b7c", http.StatusFound) + }) hmnOnly.GET(hmnurl.RegexJamsIndex, JamsIndex) hmnOnly.GET(hmnurl.RegexJamIndex, func(c *RequestContext) ResponseData {