Skip to content

Commit 8c07c8f

Browse files
committed
Try removing the first video from the imported playlist.
1 parent a8e6907 commit 8c07c8f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

testing/api-test.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,10 @@ curl "${CURLOPTS[@]}" $HOST/user/playlists/clear -X POST -H "Content-Type: appli
145145
curl "${CURLOPTS[@]}" $HOST/user/playlists/delete -X POST -H "Content-Type: application/json" -H "Authorization: $AUTH_TOKEN" -d "$(jq -n --compact-output --arg playlistId "$PLAYLIST_ID" '{"playlistId": $playlistId}')" || exit 1
146146

147147
# Import Playlist Test
148-
curl "${CURLOPTS[@]}" $HOST/import/playlist -X POST -H "Content-Type: application/json" -H "Authorization: $AUTH_TOKEN" -d "$(jq -n --compact-output --arg playlistId "PLQSoWXSpjA3-egtFq45DcUydZ885W7MTT" '{"playlistId": $playlistId}')" || exit 1
148+
IMPORTED_PLAYLIST_ID=$(curl "${CURLOPTS[@]}" $HOST/import/playlist -X POST -H "Content-Type: application/json" -H "Authorization: $AUTH_TOKEN" -d "$(jq -n --compact-output --arg playlistId "PLQSoWXSpjA3-egtFq45DcUydZ885W7MTT" '{"playlistId": $playlistId}')" | jq -r .playlistId || exit 1)
149+
150+
# Remove first video from playlist
151+
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 "$IMPORTED_PLAYLIST_ID" '{"index": $index, "playlistId": $playlistId}')" || exit 1
149152

150153
# Delete User Test
151154
curl "${CURLOPTS[@]}" $HOST/user/delete -X POST -H "Content-Type: application/json" -H "Authorization: $AUTH_TOKEN" -d "$(jq -n --compact-output --arg password "$PASS" '{"password": $password}')" || exit 1

0 commit comments

Comments
 (0)