diff --git a/middleware/Log.go b/middleware/Log.go index dcbf1c5c..aeac6e3f 100644 --- a/middleware/Log.go +++ b/middleware/Log.go @@ -74,7 +74,7 @@ func logRequest(ctx *aero.Context, responseTime time.Duration) { // Notify us about long requests. // However ignore requests under /auth/ because those depend on 3rd party servers. - if responseTime >= 300*time.Millisecond && !strings.HasPrefix(ctx.URI(), "/auth/") { + if responseTime >= 300*time.Millisecond && !strings.HasPrefix(ctx.URI(), "/auth/") && !strings.HasPrefix(ctx.URI(), "/sitemap/") { err.Error("Long response time", ip, hostName, responseTimeString, ctx.StatusCode, ctx.URI()) } } diff --git a/pages/editanime/editanime.go b/pages/anime/editanime/editanime.go similarity index 100% rename from pages/editanime/editanime.go rename to pages/anime/editanime/editanime.go diff --git a/pages/editanime/editanime.pixy b/pages/anime/editanime/editanime.pixy similarity index 100% rename from pages/editanime/editanime.pixy rename to pages/anime/editanime/editanime.pixy diff --git a/pages/editanime/history.go b/pages/anime/editanime/history.go similarity index 100% rename from pages/editanime/history.go rename to pages/anime/editanime/history.go diff --git a/pages/editanime/images.pixy b/pages/anime/editanime/images.pixy similarity index 100% rename from pages/editanime/images.pixy rename to pages/anime/editanime/images.pixy diff --git a/pages/index/animeroutes/animeroutes.go b/pages/index/animeroutes/animeroutes.go index 736ca42a..1136e518 100644 --- a/pages/index/animeroutes/animeroutes.go +++ b/pages/index/animeroutes/animeroutes.go @@ -3,7 +3,7 @@ package animeroutes import ( "github.com/aerogo/layout" "github.com/animenotifier/notify.moe/pages/anime" - "github.com/animenotifier/notify.moe/pages/editanime" + "github.com/animenotifier/notify.moe/pages/anime/editanime" "github.com/animenotifier/notify.moe/pages/episode" "github.com/animenotifier/notify.moe/pages/genre" "github.com/animenotifier/notify.moe/pages/genres" diff --git a/utils/routetests/All.go b/utils/routetests/All.go index aaa973c8..f36dee30 100644 --- a/utils/routetests/All.go +++ b/utils/routetests/All.go @@ -123,6 +123,10 @@ var routeTests = map[string][]string{ "/anime/74y2cFiiR/tracks", }, + "/anime/:id/relations": []string{ + "/anime/74y2cFiiR/relations", + }, + "/thread/:id": []string{ "/thread/HJgS7c2K", }, @@ -147,6 +151,10 @@ var routeTests = map[string][]string{ "/quote/gUZugd6zR/edit", }, + "/quote/:id/history": []string{ + "/quote/gUZugd6zR/history", + }, + "/quotes/from/:index": []string{ "/quotes/from/2", }, @@ -159,6 +167,10 @@ var routeTests = map[string][]string{ "/soundtrack/h0ac8sKkg", }, + "/soundtrack/:id/lyrics": []string{ + "/soundtrack/vS64GbpzR/lyrics", + }, + "/soundtrack/:id/edit": []string{ "/soundtrack/h0ac8sKkg/edit", }, @@ -211,6 +223,28 @@ var routeTests = map[string][]string{ "/explore/anime/2011/any/finished/tv", }, + // AMV + "/amv/:id": []string{ + "/amv/07scvSWmg", + }, + + "/amv/:id/edit": []string{ + "/amv/07scvSWmg/edit", + }, + + "/amv/:id/history": []string{ + "/amv/07scvSWmg/history", + }, + + // AMVs + "/amvs/from/:index": []string{ + "/amvs/from/3", + }, + + "/amvs/best/from/:index": []string{ + "/amvs/best/from/3", + }, + // Redirects "/mal/anime/:id": []string{ "/mal/anime/33352", @@ -289,6 +323,10 @@ var routeTests = map[string][]string{ "/anime/74y2cFiiR/episode/5", }, + "/api/amv/:id": []string{ + "/api/amv/07scvSWmg", + }, + "/api/character/:id": []string{ "/api/character/dfrNQrmmg-", }, @@ -380,6 +418,11 @@ var routeTests = map[string][]string{ "/paypal/success": nil, "/paypal/cancel": nil, "/anime/:id/edit": nil, + "/anime/:id/edit/images": nil, + "/anime/:id/edit/characters": nil, + "/anime/:id/edit/relations": nil, + "/anime/:id/edit/episodes": nil, + "/anime/:id/edit/history": nil, "/new/thread": nil, "/admin/purchases": nil, "/admin/registrations": nil,