#256: rename page URLs to match nav labels (/public, /saved)
This commit is contained in:
@@ -118,11 +118,14 @@ func (a *apiServer) routes() http.Handler {
|
||||
r.Get("/raw/{id}", a.handleRaw)
|
||||
|
||||
// web pages
|
||||
r.Get("/", http.RedirectHandler("/history", http.StatusFound).ServeHTTP)
|
||||
r.Get("/", http.RedirectHandler("/public", http.StatusFound).ServeHTTP)
|
||||
r.Get("/new", a.ui.Handlers().HandleNewPage)
|
||||
r.Get("/history", a.ui.Handlers().HandleHistoryPage)
|
||||
r.Get("/public", a.ui.Handlers().HandleHistoryPage)
|
||||
r.Get("/saved", a.ui.Handlers().HandleMinePage)
|
||||
r.Get("/settings", a.ui.Handlers().HandleSettingsPage)
|
||||
r.Get("/mine", a.ui.Handlers().HandleMinePage)
|
||||
// #256: old URLs redirect to the renamed pages
|
||||
r.Get("/history", http.RedirectHandler("/public", http.StatusMovedPermanently).ServeHTTP)
|
||||
r.Get("/mine", http.RedirectHandler("/saved", http.StatusMovedPermanently).ServeHTTP)
|
||||
r.Handle("/static/*", a.ui.StaticHandler())
|
||||
r.Get("/unlock/{id}", a.handlePasteView)
|
||||
r.Post("/unlock/{id}", a.handlePasteView)
|
||||
|
||||
Reference in New Issue
Block a user