From d3ccbd2d099bdcc44798639de6ebe5790fc3b603 Mon Sep 17 00:00:00 2001 From: Leon Klingele Date: Sun, 9 Mar 2025 08:27:52 +0100 Subject: [PATCH] fix(playlist): fix request body field name to remove playlist items The URIs field is called "tracks", not "uris". See https://developer.spotify.com/documentation/web-api/reference/remove-tracks-playlist Fixes https://github.com/spotify-api/spotify-api.js/issues/241. --- src/managers/Playlist.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/managers/Playlist.ts b/src/managers/Playlist.ts index 3a7abe6..357d420 100644 --- a/src/managers/Playlist.ts +++ b/src/managers/Playlist.ts @@ -159,7 +159,7 @@ export class PlaylistManager { const body = {} as any; if (snapshotID) body.snapshot_id = snapshotID; - if (uris) body.uris = uris.map(uri => ({ uri })); + if (uris) body.tracks = uris.map(uri => ({ uri })); const fetchedData = await this.client.fetch(`/playlists/${id}/tracks`, { method: "DELETE",