From 59fb0ed7f818ac7ad8a330e99ef2e421d7dae3b8 Mon Sep 17 00:00:00 2001 From: mkelvers Date: Fri, 15 May 2026 19:36:27 +0200 Subject: [PATCH] feat: add statistics and themes lazy section dispatch --- internal/anime/handler/handler.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/anime/handler/handler.go b/internal/anime/handler/handler.go index 28f9522..aab8ccc 100644 --- a/internal/anime/handler/handler.go +++ b/internal/anime/handler/handler.go @@ -33,6 +33,7 @@ func (h *AnimeHandler) Register(r *gin.Engine) { r.GET("/api/discover/top", h.HandleDiscoverTop) r.GET("/browse", h.HandleBrowse) r.GET("/anime/:id", h.HandleAnimeDetails) + r.GET("/anime/:id/reviews", h.HandleAnimeReviews) r.GET("/api/watch-order", h.HandleHTMLWatchOrder) r.GET("/api/search-quick", h.HandleQuickSearch) r.GET("/api/jikan/random/anime", h.HandleRandomAnime) @@ -249,6 +250,13 @@ func (h *AnimeHandler) HandleAnimeDetails(c *gin.Context) { case "recommendations": data, err = h.svc.GetRecommendations(c.Request.Context(), id) tplName = "anime_recommendations" + + case "statistics": + data, err = h.svc.GetStatistics(c.Request.Context(), id) + tplName = "anime_statistics" + case "themes": + data, err = h.svc.GetThemes(c.Request.Context(), id) + tplName = "anime_themes" } if err != nil {