Applied new layout system
This commit is contained in:
@ -1,21 +1,22 @@
|
||||
package amvroutes
|
||||
|
||||
import (
|
||||
"github.com/aerogo/layout"
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/notify.moe/pages/amv"
|
||||
"github.com/animenotifier/notify.moe/pages/amvs"
|
||||
"github.com/animenotifier/notify.moe/utils/page"
|
||||
)
|
||||
|
||||
// Register registers the page routes.
|
||||
func Register(l *layout.Layout) {
|
||||
func Register(app *aero.Application) {
|
||||
// AMV
|
||||
l.Page("/amv/:id", amv.Get)
|
||||
l.Page("/amv/:id/edit", amv.Edit)
|
||||
l.Page("/amv/:id/history", amv.History)
|
||||
page.Get(app, "/amv/:id", amv.Get)
|
||||
page.Get(app, "/amv/:id/edit", amv.Edit)
|
||||
page.Get(app, "/amv/:id/history", amv.History)
|
||||
|
||||
// AMVs
|
||||
l.Page("/amvs", amvs.Latest)
|
||||
l.Page("/amvs/from/:index", amvs.Latest)
|
||||
l.Page("/amvs/best", amvs.Best)
|
||||
l.Page("/amvs/best/from/:index", amvs.Best)
|
||||
page.Get(app, "/amvs", amvs.Latest)
|
||||
page.Get(app, "/amvs/from/:index", amvs.Latest)
|
||||
page.Get(app, "/amvs/best", amvs.Best)
|
||||
page.Get(app, "/amvs/best/from/:index", amvs.Best)
|
||||
}
|
||||
|
Reference in New Issue
Block a user