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
@@ -13,7 +13,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/db/dbq"
"git.fabledsword.com/bvandeusen/minstrel/internal/recommendation"
)
@@ -30,9 +29,8 @@ type RadioResponse struct {
// scoring formula folds in contextual_match_score using the user's current
// session vector (read from the most recent open play_event).
func (h *handlers) handleRadio(w http.ResponseWriter, r *http.Request) {
user, ok := auth.UserFromContext(r.Context())
user, ok := requireUser(w, r)
if !ok {
writeErr(w, apierror.ErrUnauthorized)
return
}
raw := strings.TrimSpace(r.URL.Query().Get("seed_track"))