refactor: remove dead code from anime and auth packages

This commit is contained in:
2026-05-12 12:34:38 +02:00
parent 6e4fdf6314
commit fc1726d1fd
3 changed files with 0 additions and 27 deletions

View File

@@ -459,10 +459,6 @@ func (h *Handler) HandleSearch(w http.ResponseWriter, r *http.Request) {
renderNotFoundPage(r, w)
}
func (h *Handler) HandleStudioDetails(w http.ResponseWriter, r *http.Request) {
renderNotFoundPage(r, w)
}
func renderNotFoundPage(r *http.Request, w http.ResponseWriter) {
w.WriteHeader(http.StatusNotFound)
if err := templates.GetRenderer().ExecuteTemplate(r.Context(), w, "not_found.gohtml", map[string]any{

View File

@@ -128,18 +128,3 @@ func (s *Service) GetDiscoverSection(ctx context.Context, userID string, section
"WatchlistMap": watchlistMap,
}, nil
}
// filterUnique deduplicates anime list by mal id, respecting limit.
func (s *Service) filterUnique(animes []jikan.Anime, seen map[int]bool, limit int) []jikan.Anime {
unique := make([]jikan.Anime, 0)
for _, a := range animes {
if !seen[a.MalID] {
seen[a.MalID] = true
unique = append(unique, a)
}
if len(unique) >= limit {
break
}
}
return unique
}