Applied new layout system

This commit is contained in:
2019-06-03 12:20:17 +09:00
parent 36427a1501
commit 3268488b7b
26 changed files with 346 additions and 308 deletions

View File

@ -1,21 +1,22 @@
package importroutes
import (
"github.com/aerogo/layout"
"github.com/aerogo/aero"
"github.com/animenotifier/notify.moe/pages/listimport"
"github.com/animenotifier/notify.moe/pages/listimport/listimportanilist"
"github.com/animenotifier/notify.moe/pages/listimport/listimportkitsu"
"github.com/animenotifier/notify.moe/pages/listimport/listimportmyanimelist"
"github.com/animenotifier/notify.moe/utils/page"
)
// Register registers the page routes.
func Register(l *layout.Layout) {
func Register(app *aero.Application) {
// Import
l.Page("/import", listimport.Get)
l.Page("/import/anilist/animelist", listimportanilist.Preview)
l.Page("/import/anilist/animelist/finish", listimportanilist.Finish)
l.Page("/import/myanimelist/animelist", listimportmyanimelist.Preview)
l.Page("/import/myanimelist/animelist/finish", listimportmyanimelist.Finish)
l.Page("/import/kitsu/animelist", listimportkitsu.Preview)
l.Page("/import/kitsu/animelist/finish", listimportkitsu.Finish)
page.Get(app, "/import", listimport.Get)
page.Get(app, "/import/anilist/animelist", listimportanilist.Preview)
page.Get(app, "/import/anilist/animelist/finish", listimportanilist.Finish)
page.Get(app, "/import/myanimelist/animelist", listimportmyanimelist.Preview)
page.Get(app, "/import/myanimelist/animelist/finish", listimportmyanimelist.Finish)
page.Get(app, "/import/kitsu/animelist", listimportkitsu.Preview)
page.Get(app, "/import/kitsu/animelist/finish", listimportkitsu.Finish)
}