From 0b16f5f2202e0c0832b5e678fadd95c64b8e8789 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 13 Mar 2019 16:03:03 +0100 Subject: Add videos playlist exist tests --- shared/utils/videos/video-playlists.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'shared/utils') diff --git a/shared/utils/videos/video-playlists.ts b/shared/utils/videos/video-playlists.ts index b84b21623..ad65bec56 100644 --- a/shared/utils/videos/video-playlists.ts +++ b/shared/utils/videos/video-playlists.ts @@ -275,6 +275,18 @@ function getVideoPlaylistPrivacies (url: string) { }) } +function doVideosExistInMyPlaylist (url: string, token: string, videoIds: number[]) { + const path = '/api/v1/users/me/video-playlists/videos-exist' + + return makeGetRequest({ + url, + token, + path, + query: { videoIds }, + statusCodeExpected: 200 + }) +} + // --------------------------------------------------------------------------- export { @@ -298,5 +310,7 @@ export { reorderVideosPlaylist, - checkPlaylistFilesWereRemoved + checkPlaylistFilesWereRemoved, + + doVideosExistInMyPlaylist } -- cgit v1.2.3