2018-04-25 18:03:35 +00:00
|
|
|
package userroutes
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/aerogo/layout"
|
|
|
|
"github.com/animenotifier/arn"
|
|
|
|
"github.com/animenotifier/notify.moe/pages/animelist"
|
|
|
|
"github.com/animenotifier/notify.moe/pages/animelistitem"
|
|
|
|
"github.com/animenotifier/notify.moe/pages/compare"
|
2018-12-06 05:13:49 +00:00
|
|
|
"github.com/animenotifier/notify.moe/pages/explore/explorerelations"
|
2018-04-25 18:03:35 +00:00
|
|
|
"github.com/animenotifier/notify.moe/pages/notifications"
|
|
|
|
"github.com/animenotifier/notify.moe/pages/profile"
|
|
|
|
"github.com/animenotifier/notify.moe/pages/recommended"
|
|
|
|
"github.com/animenotifier/notify.moe/pages/user"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Register registers the page routes.
|
|
|
|
func Register(l *layout.Layout) {
|
|
|
|
// User profiles
|
|
|
|
l.Page("/user", user.Get)
|
|
|
|
l.Page("/user/:nick", profile.Get)
|
2018-11-24 06:57:52 +00:00
|
|
|
// l.Page("/user/:nick/characters/liked", profilecharacters.Liked)
|
|
|
|
// l.Page("/user/:nick/forum/threads", profile.GetThreadsByUser)
|
|
|
|
// l.Page("/user/:nick/forum/posts", profile.GetPostsByUser)
|
|
|
|
// l.Page("/user/:nick/soundtracks/added", profiletracks.Added)
|
|
|
|
// l.Page("/user/:nick/soundtracks/added/from/:index", profiletracks.Added)
|
|
|
|
// l.Page("/user/:nick/soundtracks/liked", profiletracks.Liked)
|
|
|
|
// l.Page("/user/:nick/soundtracks/liked/from/:index", profiletracks.Liked)
|
|
|
|
// l.Page("/user/:nick/quotes/added", profilequotes.Added)
|
|
|
|
// l.Page("/user/:nick/quotes/added/from/:index", profilequotes.Added)
|
|
|
|
// l.Page("/user/:nick/quotes/liked", profilequotes.Liked)
|
|
|
|
// l.Page("/user/:nick/quotes/liked/from/:index", profilequotes.Liked)
|
|
|
|
// l.Page("/user/:nick/stats", profile.GetStatsByUser)
|
|
|
|
// l.Page("/user/:nick/followers", profile.GetFollowers)
|
2018-04-25 18:03:35 +00:00
|
|
|
l.Page("/user/:nick/animelist/anime/:id", animelistitem.Get)
|
2018-12-06 05:13:49 +00:00
|
|
|
l.Page("/user/:nick/anime/recommended", recommended.Anime)
|
|
|
|
l.Page("/user/:nick/anime/sequels", explorerelations.Sequels)
|
2018-04-25 18:03:35 +00:00
|
|
|
l.Page("/user/:nick/notifications", notifications.ByUser)
|
|
|
|
l.Page("/user/:nick/edit", user.Edit)
|
|
|
|
|
|
|
|
// Anime list
|
|
|
|
l.Page("/user/:nick/animelist/watching", animelist.FilterByStatus(arn.AnimeListStatusWatching))
|
|
|
|
l.Page("/user/:nick/animelist/completed", animelist.FilterByStatus(arn.AnimeListStatusCompleted))
|
|
|
|
l.Page("/user/:nick/animelist/planned", animelist.FilterByStatus(arn.AnimeListStatusPlanned))
|
|
|
|
l.Page("/user/:nick/animelist/hold", animelist.FilterByStatus(arn.AnimeListStatusHold))
|
|
|
|
l.Page("/user/:nick/animelist/dropped", animelist.FilterByStatus(arn.AnimeListStatusDropped))
|
|
|
|
|
|
|
|
l.Page("/user/:nick/animelist/watching/from/:index", animelist.FilterByStatus(arn.AnimeListStatusWatching))
|
|
|
|
l.Page("/user/:nick/animelist/completed/from/:index", animelist.FilterByStatus(arn.AnimeListStatusCompleted))
|
|
|
|
l.Page("/user/:nick/animelist/planned/from/:index", animelist.FilterByStatus(arn.AnimeListStatusPlanned))
|
|
|
|
l.Page("/user/:nick/animelist/hold/from/:index", animelist.FilterByStatus(arn.AnimeListStatusHold))
|
|
|
|
l.Page("/user/:nick/animelist/dropped/from/:index", animelist.FilterByStatus(arn.AnimeListStatusDropped))
|
|
|
|
|
|
|
|
// Redirects
|
|
|
|
l.Page("/animelist/watching", animelist.Redirect)
|
|
|
|
l.Page("/animelist/completed", animelist.Redirect)
|
|
|
|
l.Page("/animelist/planned", animelist.Redirect)
|
|
|
|
l.Page("/animelist/hold", animelist.Redirect)
|
|
|
|
l.Page("/animelist/dropped", animelist.Redirect)
|
|
|
|
|
|
|
|
// Compare
|
|
|
|
l.Page("/compare/animelist/:nick-1/:nick-2", compare.AnimeList)
|
|
|
|
|
|
|
|
// Notifications
|
|
|
|
l.Page("/notifications", notifications.ByUser)
|
|
|
|
l.Page("/notifications/all", notifications.All)
|
|
|
|
}
|