fix(server): repair go vet failures from A1+A2 cleanup (orphan imports + needle deref)
This commit is contained in:
@@ -14,7 +14,6 @@ import (
|
|||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/audit"
|
"git.fabledsword.com/bvandeusen/minstrel/internal/audit"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import (
|
|||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/tracks"
|
"git.fabledsword.com/bvandeusen/minstrel/internal/tracks"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -303,6 +303,3 @@ func uuidsToStrings(ids []pgtype.UUID) []string {
|
|||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compile-time references so the json import is always live even when
|
|
||||||
// no handler in this file decodes a body.
|
|
||||||
var _ = json.Marshal
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/go-chi/chi/v5"
|
||||||
"github.com/jackc/pgx/v5"
|
"github.com/jackc/pgx/v5"
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
|
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ func (h *handlers) handleSearch(w http.ResponseWriter, r *http.Request) {
|
|||||||
userID = user.ID
|
userID = user.ID
|
||||||
}
|
}
|
||||||
tracks, err := dbQ.SearchTracks(r.Context(), dbq.SearchTracksParams{
|
tracks, err := dbQ.SearchTracks(r.Context(), dbq.SearchTracksParams{
|
||||||
Column1: needle, UserID: userID, Limit: int32(limit), Offset: int32(offset),
|
Column1: q, UserID: userID, Limit: int32(limit), Offset: int32(offset),
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
h.logger.Error("api: search tracks failed", "err", err)
|
h.logger.Error("api: search tracks failed", "err", err)
|
||||||
|
|||||||
@@ -376,7 +376,7 @@ func (b *browseHandlers) search3(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
if songCount > 0 {
|
if songCount > 0 {
|
||||||
tracks, err := q.SearchTracks(r.Context(), dbq.SearchTracksParams{
|
tracks, err := q.SearchTracks(r.Context(), dbq.SearchTracksParams{
|
||||||
Column1: needle, Limit: int32(songCount), Offset: int32(songOffset),
|
Column1: query, Limit: int32(songCount), Offset: int32(songOffset),
|
||||||
}) // UserID left zero (NULL) — Subsonic has no per-user quarantine context
|
}) // UserID left zero (NULL) — Subsonic has no per-user quarantine context
|
||||||
if err != nil {
|
if err != nil {
|
||||||
WriteFail(w, r, ErrGeneric, "Song search failed")
|
WriteFail(w, r, ErrGeneric, "Song search failed")
|
||||||
|
|||||||
Reference in New Issue
Block a user