refactor(server/api): migrate library/suggestions/radio/home preludes (A2 4/N)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user