aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-03-13 16:03:03 +0100
committerChocobozzz <chocobozzz@cpy.re>2019-03-18 11:17:59 +0100
commit0b16f5f2202e0c0832b5e678fadd95c64b8e8789 (patch)
treebe67b2c32fb4ba3e3ab31ce1ef6793e66af1a89f /shared
parente2f01c47e08d26a30ad47068d195b3d21d0df8a1 (diff)
downloadPeerTube-0b16f5f2202e0c0832b5e678fadd95c64b8e8789.tar.gz
PeerTube-0b16f5f2202e0c0832b5e678fadd95c64b8e8789.tar.zst
PeerTube-0b16f5f2202e0c0832b5e678fadd95c64b8e8789.zip
Add videos playlist exist tests
Diffstat (limited to 'shared')
-rw-r--r--shared/utils/videos/video-playlists.ts16
1 files changed, 15 insertions, 1 deletions
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) {
275 }) 275 })
276} 276}
277 277
278function doVideosExistInMyPlaylist (url: string, token: string, videoIds: number[]) {
279 const path = '/api/v1/users/me/video-playlists/videos-exist'
280
281 return makeGetRequest({
282 url,
283 token,
284 path,
285 query: { videoIds },
286 statusCodeExpected: 200
287 })
288}
289
278// --------------------------------------------------------------------------- 290// ---------------------------------------------------------------------------
279 291
280export { 292export {
@@ -298,5 +310,7 @@ export {
298 310
299 reorderVideosPlaylist, 311 reorderVideosPlaylist,
300 312
301 checkPlaylistFilesWereRemoved 313 checkPlaylistFilesWereRemoved,
314
315 doVideosExistInMyPlaylist
302} 316}