Add support for legacy artwork URL

This commit is contained in:
VnPower
2023-11-13 20:49:26 +07:00
parent 2a202a191a
commit 87ce41cb72
+7 -2
View File
@@ -47,8 +47,8 @@ func SetupRoutes(r *fiber.App) {
})
r.Get("/", index_page)
r.Get("/about", about_page)
r.Get("artworks/:id/", limit, artwork_page)
r.Get("about", about_page)
r.Get("artworks/:id/", limit, artwork_page).Name("artworks")
r.Get("users/:id/:category?", user_page)
r.Get("newest", newest_artworks_page)
r.Get("ranking", ranking_page)
@@ -67,6 +67,11 @@ func SetupRoutes(r *fiber.App) {
settings.Get("/", settings_page)
settings.Post("/:type", settings_post)
// Legacy illust URL
r.Get("member_illust.php", func(c *fiber.Ctx) error {
return c.Redirect("artworks/" + c.Query("illust_id"))
})
// 404 page
// r.NoRoute(not_found_page)
}