Add route to remove from playlist.

This commit is contained in:
Kavin 2022-04-06 14:21:46 +01:00
parent 00e32dc992
commit 3d6aefdd0e
No known key found for this signature in database
GPG key ID: 49451E4482CC5BCD
4 changed files with 53 additions and 2 deletions

View file

@ -101,3 +101,6 @@ curl ${CURLOPTS[@]} $HOST/playlists/$PLAYLIST_ID || exit 1
# Add to Playlist Test
curl ${CURLOPTS[@]} $HOST/user/playlists/add -X POST -H "Content-Type: application/json" -H "Authorization: $AUTH_TOKEN" -d $(jq -n --compact-output --arg videoId "BtN-goy9VOY" --arg playlistId $PLAYLIST_ID '{"videoId": $videoId, "playlistId": $playlistId}') || exit 1
# Remove from Playlist Test
curl ${CURLOPTS[@]} $HOST/user/playlists/remove -X POST -H "Content-Type: application/json" -H "Authorization: $AUTH_TOKEN" -d $(jq -n --compact-output --arg index "0" --arg playlistId $PLAYLIST_ID '{"index": $index, "playlistId": $playlistId}') || exit 1