46 lines
1.3 KiB
Go
Raw Normal View History

package coreroutes
import (
2019-06-03 03:20:17 +00:00
"github.com/aerogo/aero"
2018-10-31 05:27:48 +00:00
"github.com/animenotifier/notify.moe/pages/activity"
"github.com/animenotifier/notify.moe/pages/calendar"
"github.com/animenotifier/notify.moe/pages/embed"
"github.com/animenotifier/notify.moe/pages/home"
"github.com/animenotifier/notify.moe/pages/login"
"github.com/animenotifier/notify.moe/pages/statistics"
"github.com/animenotifier/notify.moe/pages/terms"
2018-11-15 03:42:10 +00:00
"github.com/animenotifier/notify.moe/pages/welcome"
2019-06-03 03:20:17 +00:00
"github.com/animenotifier/notify.moe/utils/page"
)
// Register registers the page routes.
2019-06-03 03:20:17 +00:00
func Register(app *aero.Application) {
// Front page
2019-06-03 03:20:17 +00:00
page.Get(app, "/", home.Get)
// Login
2019-06-03 03:20:17 +00:00
page.Get(app, "/login", login.Get)
2018-11-15 03:42:10 +00:00
// Welcome
2019-06-03 03:20:17 +00:00
page.Get(app, "/welcome", welcome.Get)
2018-11-15 03:42:10 +00:00
2018-10-31 05:27:48 +00:00
// Activity
2019-06-03 03:20:17 +00:00
page.Get(app, "/activity", activity.Global)
page.Get(app, "/activity/from/:index", activity.Global)
page.Get(app, "/activity/followed", activity.Followed)
page.Get(app, "/activity/followed/from/:index", activity.Followed)
2018-10-31 05:27:48 +00:00
// Calendar
2019-06-03 03:20:17 +00:00
page.Get(app, "/calendar", calendar.Get)
// Statistics
2019-06-03 03:20:17 +00:00
page.Get(app, "/statistics", statistics.Get)
page.Get(app, "/statistics/anime", statistics.Anime)
// Legal stuff
2019-06-03 03:20:17 +00:00
page.Get(app, "/terms", terms.Get)
// Browser extension
2019-06-03 03:20:17 +00:00
page.Get(app, "/extension/embed", embed.Get)
}