96 lines
4.2 KiB
Go
Raw Normal View History

package staffroutes
import (
"github.com/aerogo/aero"
"github.com/animenotifier/notify.moe/pages/admin"
"github.com/animenotifier/notify.moe/pages/editlog"
"github.com/animenotifier/notify.moe/pages/editor"
"github.com/animenotifier/notify.moe/pages/editor/filteranime"
2020-02-22 08:07:47 +00:00
"github.com/animenotifier/notify.moe/pages/editor/filtercharacters"
"github.com/animenotifier/notify.moe/pages/editor/filtercompanies"
"github.com/animenotifier/notify.moe/pages/editor/filtersoundtracks"
"github.com/animenotifier/notify.moe/pages/editor/jobs"
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) {
// Editor
2019-06-03 03:20:17 +00:00
page.Get(app, "/editor", editor.Get)
// Editor links can be filtered by year, status and type
2019-06-01 04:55:49 +00:00
editorFilterable := func(route string, handler func(ctx aero.Context) error) {
2019-06-03 03:20:17 +00:00
page.Get(app, route+"/:year/:season/:status/:type", handler)
}
// Editor - Anime
editorFilterable("/editor/anime/mapping/shoboi", filteranime.Shoboi)
editorFilterable("/editor/anime/mapping/anilist", filteranime.AniList)
editorFilterable("/editor/anime/mapping/mal", filteranime.MAL)
editorFilterable("/editor/anime/mapping/kitsu", filteranime.Kitsu)
editorFilterable("/editor/anime/mapping/duplicate", filteranime.DuplicateMappings)
editorFilterable("/editor/anime/image/lowres", filteranime.LowResolutionAnimeImages)
editorFilterable("/editor/anime/image/ultralowres", filteranime.UltraLowResolutionAnimeImages)
editorFilterable("/editor/anime/companies/studios", filteranime.Studios)
editorFilterable("/editor/anime/companies/producers", filteranime.Producers)
editorFilterable("/editor/anime/companies/licensors", filteranime.Licensors)
editorFilterable("/editor/anime/connections/relations", filteranime.Relations)
editorFilterable("/editor/anime/connections/characters", filteranime.Characters)
editorFilterable("/editor/anime/details/synopsis", filteranime.Synopsis)
editorFilterable("/editor/anime/details/genres", filteranime.Genres)
editorFilterable("/editor/anime/details/trailers", filteranime.Trailers)
editorFilterable("/editor/anime/details/startdate", filteranime.StartDate)
2020-02-22 08:07:47 +00:00
editorFilterable("/editor/anime/details/enddate", filteranime.EndDate)
editorFilterable("/editor/anime/details/episodelength", filteranime.EpisodeLength)
2020-11-06 23:24:27 +00:00
editorFilterable("/editor/anime/details/episodecount", filteranime.EpisodeCount)
editorFilterable("/editor/anime/details/source", filteranime.Source)
editorFilterable("/editor/anime/details/status", filteranime.Status)
editorFilterable("/editor/anime/all", filteranime.All)
2020-02-22 08:07:47 +00:00
// Editor - Characters
page.Get(app, "/editor/character/image/none", filtercharacters.NoImage)
// Editor - MALdiff
editorFilterable("/editor/mal/diff/anime", editor.CompareMAL)
// Editor - Kitsu
2019-06-03 03:20:17 +00:00
page.Get(app, "/editor/kitsu/new/anime", editor.NewKitsuAnime)
// Editor - Companies
2019-06-03 03:20:17 +00:00
page.Get(app, "/editor/companies/description", filtercompanies.NoDescription)
// Editor - Soundtracks
2019-06-03 03:20:17 +00:00
page.Get(app, "/editor/soundtracks/links", filtersoundtracks.Links)
page.Get(app, "/editor/soundtracks/lyrics/missing", filtersoundtracks.MissingLyrics)
page.Get(app, "/editor/soundtracks/lyrics/unaligned", filtersoundtracks.UnalignedLyrics)
page.Get(app, "/editor/soundtracks/tags", filtersoundtracks.Tags)
page.Get(app, "/editor/soundtracks/file", filtersoundtracks.File)
// Editor - Jobs
2019-06-03 03:20:17 +00:00
page.Get(app, "/editor/jobs", jobs.Overview)
// Log
2020-02-10 08:58:35 +00:00
page.Get(app, "/log", editlog.Full)
page.Get(app, "/log/from/:index", editlog.Full)
page.Get(app, "/log/compact", editlog.Compact)
page.Get(app, "/log/compact/from/:index", editlog.Compact)
page.Get(app, "/user/:nick/log", editlog.Full)
page.Get(app, "/user/:nick/log/from/:index", editlog.Full)
page.Get(app, "/user/:nick/log/compact", editlog.Compact)
page.Get(app, "/user/:nick/log/compact/from/:index", editlog.Compact)
// Admin
2019-06-03 03:20:17 +00:00
page.Get(app, "/admin", admin.Get)
page.Get(app, "/admin/webdev", admin.WebDev)
page.Get(app, "/admin/registrations", admin.UserRegistrations)
2019-11-04 07:34:00 +00:00
page.Get(app, "/admin/crashes", admin.Crashes)
2019-06-03 03:20:17 +00:00
page.Get(app, "/admin/errors/client", admin.ClientErrors)
page.Get(app, "/admin/purchases", admin.PurchaseHistory)
page.Get(app, "/admin/payments", admin.PaymentHistory)
}