Add songs to playlists with drag and drop

This commit is contained in:
Deluan
2021-10-01 10:37:05 -04:00
parent 2ab4647420
commit 6c3e45de41
14 changed files with 392 additions and 94 deletions
@@ -57,6 +57,12 @@ const wrapperDataProvider = {
const [r, p] = mapResource(resource, params)
return dataProvider.deleteMany(r, p)
},
addToPlaylist: (playlistId, data) => {
return httpClient(`${REST_URL}/playlist/${playlistId}/tracks`, {
method: 'POST',
body: JSON.stringify(data),
}).then(({ json }) => ({ data: json }))
},
}
export default wrapperDataProvider