fix error now we are synced with upstream

This commit is contained in:
luke-1993 2023-12-24 12:30:37 +00:00 committed by lukepurnell
parent c94e894beb
commit fc42a930e2

View File

@ -7,9 +7,9 @@ import (
"net/http" "net/http"
"strings" "strings"
"github.com/go-chi/chi/v5"
"github.com/navidrome/navidrome/log" "github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/model" "github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/utils"
) )
type BeetsItem struct { type BeetsItem struct {
@ -100,7 +100,7 @@ type BeetsItem struct {
func deleteSong(ds model.DataStore) http.HandlerFunc { func deleteSong(ds model.DataStore) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) { return func(w http.ResponseWriter, r *http.Request) {
// todo: tests, use proper url parsing lib // todo: tests, use proper url parsing lib
id := utils.ParamString(r, ":id") id := chi.URLParam(r, "id")
ctx := r.Context() ctx := r.Context()
ids := strings.Split(id, ",") ids := strings.Split(id, ",")
for _, id := range ids { for _, id := range ids {