From fa60a5921fb8088a4023794b08b27cc741acbd4e Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Mon, 4 Sep 2017 11:27:19 +0100 Subject: [PATCH] Removes unnecessary deviceIds parameter from request to transfer playback (#154) --- src/spotify-web-api.js | 1 + test/spotify-web-api.js | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/spotify-web-api.js b/src/spotify-web-api.js index 8de6061d..c417a285 100644 --- a/src/spotify-web-api.js +++ b/src/spotify-web-api.js @@ -1689,6 +1689,7 @@ SpotifyWebApi.prototype = { }) .build(); + delete options.deviceIds; this._addAccessToken(request, this.getAccessToken()); this._addBodyParameters(request, options); diff --git a/test/spotify-web-api.js b/test/spotify-web-api.js index 060ad84f..c2be1bbe 100644 --- a/test/spotify-web-api.js +++ b/test/spotify-web-api.js @@ -1306,8 +1306,7 @@ describe('Spotify Web API', function() { uri.should.equal('https://api.spotify.com/v1/me/player'); JSON.parse(options.data).should.eql({ 'device_ids': ['deviceId'], - 'play': true, - 'deviceIds' : ['deviceId'] + 'play': true }); should.not.exist(options.query); callback();