2018-04-25 18:03:35 +00:00
|
|
|
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"
|
2018-04-25 18:03:35 +00:00
|
|
|
"github.com/animenotifier/notify.moe/pages/editor/filtercompanies"
|
|
|
|
"github.com/animenotifier/notify.moe/pages/editor/filtersoundtracks"
|
2018-04-28 17:44:44 +00:00
|
|
|
"github.com/animenotifier/notify.moe/pages/editor/jobs"
|
2019-06-03 03:20:17 +00:00
|
|
|
"github.com/animenotifier/notify.moe/utils/page"
|
2018-04-25 18:03:35 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// Register registers the page routes.
|
2019-06-03 03:20:17 +00:00
|
|
|
func Register(app *aero.Application) {
|
2018-04-25 18:03:35 +00:00
|
|
|
// Editor
|
2019-06-03 03:20:17 +00:00
|
|
|
page.Get(app, "/editor", editor.Get)
|
2018-04-25 18:03:35 +00:00
|
|
|
|
|
|
|
// 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)
|
2018-04-25 18:03:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Editor - Anime
|
|
|
|
editorFilterable("/editor/anime/mapping/shoboi", filteranime.Shoboi)
|
|
|
|
editorFilterable("/editor/anime/mapping/anilist", filteranime.AniList)
|
|
|
|
editorFilterable("/editor/anime/mapping/mal", filteranime.MAL)
|
2019-11-04 06:29:50 +00:00
|
|
|
editorFilterable("/editor/anime/mapping/kitsu", filteranime.Kitsu)
|
2018-04-25 18:03:35 +00:00
|
|
|
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)
|
2018-04-25 18:03:35 +00:00
|
|
|
editorFilterable("/editor/anime/details/episodelength", filteranime.EpisodeLength)
|
2020-11-06 23:24:27 +00:00
|
|
|
editorFilterable("/editor/anime/details/episodecount", filteranime.EpisodeCount)
|
2018-04-25 18:03:35 +00:00
|
|
|
editorFilterable("/editor/anime/details/source", filteranime.Source)
|
2020-02-14 07:31:49 +00:00
|
|
|
editorFilterable("/editor/anime/details/status", filteranime.Status)
|
2018-04-25 18:03:35 +00:00
|
|
|
|
|
|
|
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)
|
|
|
|
|
2018-04-25 18:03:35 +00:00
|
|
|
// 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)
|
2018-04-25 18:03:35 +00:00
|
|
|
|
|
|
|
// Editor - Companies
|
2019-06-03 03:20:17 +00:00
|
|
|
page.Get(app, "/editor/companies/description", filtercompanies.NoDescription)
|
2018-04-25 18:03:35 +00:00
|
|
|
|
|
|
|
// 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)
|
2018-04-25 18:03:35 +00:00
|
|
|
|
2018-04-28 17:44:44 +00:00
|
|
|
// Editor - Jobs
|
2019-06-03 03:20:17 +00:00
|
|
|
page.Get(app, "/editor/jobs", jobs.Overview)
|
2018-04-28 17:44:44 +00:00
|
|
|
|
2018-04-25 18:03:35 +00:00
|
|
|
// 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)
|
2018-04-25 18:03:35 +00:00
|
|
|
|
|
|
|
// 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)
|
2018-04-25 18:03:35 +00:00
|
|
|
}
|