refactor(server/api): migrate library/suggestions/radio/home preludes (A2 4/N)

This commit is contained in:
2026-05-08 08:43:36 -04:00
parent dde3dd2804
commit 79c3ec3659
4 changed files with 5 additions and 14 deletions
+1 -3
View File
@@ -7,7 +7,6 @@ import (
"github.com/jackc/pgx/v5/pgtype"
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
"git.fabledsword.com/bvandeusen/minstrel/internal/recommendation"
)
@@ -35,9 +34,8 @@ type seedContributionView struct {
//
// Returns 200 with a JSON array (possibly empty). Read-only; no admin gate.
func (h *handlers) handleListSuggestions(w http.ResponseWriter, r *http.Request) {
user, ok := auth.UserFromContext(r.Context())
user, ok := requireUser(w, r)
if !ok {
writeErr(w, apierror.ErrUnauthorized)
return
}
limit := 12