Add Unwind URL
This commit is contained in:
parent
b681bacc16
commit
6dd2a32780
|
@ -44,10 +44,6 @@ func TestShowcase(t *testing.T) {
|
||||||
AssertRegexMatch(t, BuildShowcase(), RegexShowcase, nil)
|
AssertRegexMatch(t, BuildShowcase(), RegexShowcase, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestStreams(t *testing.T) {
|
|
||||||
AssertRegexMatch(t, BuildStreams(), RegexStreams, nil)
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestWhenIsIt(t *testing.T) {
|
func TestWhenIsIt(t *testing.T) {
|
||||||
AssertRegexMatch(t, BuildWhenIsIt(), RegexWhenIsIt, nil)
|
AssertRegexMatch(t, BuildWhenIsIt(), RegexWhenIsIt, nil)
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,13 +35,6 @@ func BuildShowcase() string {
|
||||||
return Url("/showcase", nil)
|
return Url("/showcase", nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
var RegexStreams = regexp.MustCompile("^/streams$")
|
|
||||||
|
|
||||||
func BuildStreams() string {
|
|
||||||
defer CatchPanic()
|
|
||||||
return Url("/streams", nil)
|
|
||||||
}
|
|
||||||
|
|
||||||
var RegexWhenIsIt = regexp.MustCompile("^/whenisit$")
|
var RegexWhenIsIt = regexp.MustCompile("^/whenisit$")
|
||||||
|
|
||||||
func BuildWhenIsIt() string {
|
func BuildWhenIsIt() string {
|
||||||
|
@ -1047,6 +1040,12 @@ func BuildUserFile(filepath string) string {
|
||||||
return BuildPublic(fmt.Sprintf("media/%s", filepath), false)
|
return BuildPublic(fmt.Sprintf("media/%s", filepath), false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Redirects
|
||||||
|
*/
|
||||||
|
|
||||||
|
var RegexUnwind = regexp.MustCompile(`^/unwind$`)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Other
|
* Other
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -24,7 +24,6 @@ type LandingTemplateData struct {
|
||||||
ManifestoUrl string
|
ManifestoUrl string
|
||||||
FeedUrl string
|
FeedUrl string
|
||||||
PodcastUrl string
|
PodcastUrl string
|
||||||
StreamsUrl string
|
|
||||||
ShowcaseUrl string
|
ShowcaseUrl string
|
||||||
AtomFeedUrl string
|
AtomFeedUrl string
|
||||||
MarkAllReadUrl string
|
MarkAllReadUrl string
|
||||||
|
@ -151,7 +150,6 @@ func Index(c *RequestContext) ResponseData {
|
||||||
ManifestoUrl: hmnurl.BuildManifesto(),
|
ManifestoUrl: hmnurl.BuildManifesto(),
|
||||||
FeedUrl: hmnurl.BuildFeed(),
|
FeedUrl: hmnurl.BuildFeed(),
|
||||||
PodcastUrl: hmnurl.BuildPodcast(),
|
PodcastUrl: hmnurl.BuildPodcast(),
|
||||||
StreamsUrl: hmnurl.BuildStreams(),
|
|
||||||
ShowcaseUrl: hmnurl.BuildShowcase(),
|
ShowcaseUrl: hmnurl.BuildShowcase(),
|
||||||
AtomFeedUrl: hmnurl.BuildAtomFeed(),
|
AtomFeedUrl: hmnurl.BuildAtomFeed(),
|
||||||
MarkAllReadUrl: hmnurl.HMNProjectContext.BuildForumMarkRead(0),
|
MarkAllReadUrl: hmnurl.HMNProjectContext.BuildForumMarkRead(0),
|
||||||
|
|
|
@ -164,6 +164,10 @@ func NewWebsiteRoutes(conn *pgxpool.Pool) http.Handler {
|
||||||
return c.Redirect(hmnurl.BuildEducationIndex(), http.StatusFound)
|
return c.Redirect(hmnurl.BuildEducationIndex(), http.StatusFound)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
hmnOnly.GET(hmnurl.RegexUnwind, func(c *RequestContext) ResponseData {
|
||||||
|
return c.Redirect("https://www.youtube.com/playlist?list=PL-IPpPzBYXBGsAd9-c2__x6LJG4Zszs0T", http.StatusFound)
|
||||||
|
})
|
||||||
|
|
||||||
// Project routes can appear either at the root (e.g. hero.handmade.network/edit)
|
// Project routes can appear either at the root (e.g. hero.handmade.network/edit)
|
||||||
// or on a personal project path (e.g. handmade.network/p/123/hero/edit). So, we
|
// or on a personal project path (e.g. handmade.network/p/123/hero/edit). So, we
|
||||||
// have pulled all those routes into this function.
|
// have pulled all those routes into this function.
|
||||||
|
|
Loading…
Reference in New Issue