@ekwoka/spotify-api
Advanced tools
Comparing version 0.13.0 to 0.13.1
@@ -11,6 +11,6 @@ import { batchWrap, spotifyFetch } from '../../utils'; | ||
if (Array.isArray(ids)) | ||
return (client) => Promise.all(ids.map((id) => cacheSavedTracks(client, id))); | ||
return (client) => cacheSavedTracks(client, ids); | ||
return (client) => Promise.all(ids.map((id) => cacheRemovedTracks(client, id))); | ||
return (client) => cacheRemovedTracks(client, ids); | ||
}); | ||
const cacheSavedTracks = async ({ token, cache }, track) => { | ||
const cacheRemovedTracks = async ({ token, cache }, track) => { | ||
const data = await batchRemoveTracks(token, track); | ||
@@ -22,7 +22,7 @@ cache.saved.tracks[track] = false; | ||
const endpoint = `me/tracks`; | ||
const data = await spotifyFetch(endpoint, token, { | ||
await spotifyFetch(endpoint, token, { | ||
method: 'DELETE', | ||
body: JSON.stringify({ ids }), | ||
}); | ||
return data; | ||
}, false); | ||
return ids.map(() => false); | ||
}); |
@@ -21,7 +21,7 @@ import { batchWrap, spotifyFetch } from '../../utils'; | ||
const endpoint = `me/tracks`; | ||
const data = await spotifyFetch(endpoint, token, { | ||
await spotifyFetch(endpoint, token, { | ||
method: 'PUT', | ||
body: JSON.stringify({ ids }), | ||
}); | ||
return data; | ||
}, false); | ||
return ids.map(() => true); | ||
}); |
@@ -16,3 +16,3 @@ { | ||
"license": "MIT", | ||
"version": "0.13.0", | ||
"version": "0.13.1", | ||
"description": "Composable Wrapper for the Spotify Web Api and Spotify Web Playback SDK", | ||
@@ -30,3 +30,3 @@ "repository": "github:ekwoka/spotify-api", | ||
"devDependencies": { | ||
"@types/node": "^18.11.6", | ||
"@types/node": "^18.11.7", | ||
"@typescript-eslint/eslint-plugin": "^5.41.0", | ||
@@ -44,4 +44,4 @@ "@typescript-eslint/parser": "^5.41.0", | ||
"typescript": "^4.8.4", | ||
"undici": "^5.11.0", | ||
"vite": "^3.2.0", | ||
"undici": "^5.12.0", | ||
"vite": "^3.2.1", | ||
"vitest": "^0.24.3" | ||
@@ -48,0 +48,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
126383