Refactor page routes into multiple submodules

This commit is contained in:
2018-04-25 20:03:35 +02:00
parent d331e15363
commit 2503d63b60
21 changed files with 577 additions and 369 deletions

View File

@ -0,0 +1,21 @@
package importroutes
import (
"github.com/aerogo/layout"
"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"
)
// Register registers the page routes.
func Register(l *layout.Layout) {
// 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)
}