diff options
author | Chocobozzz <me@florianbigard.com> | 2019-03-13 16:03:03 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-03-18 11:17:59 +0100 |
commit | 0b16f5f2202e0c0832b5e678fadd95c64b8e8789 (patch) | |
tree | be67b2c32fb4ba3e3ab31ce1ef6793e66af1a89f /shared | |
parent | e2f01c47e08d26a30ad47068d195b3d21d0df8a1 (diff) | |
download | PeerTube-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.ts | 16 |
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 | ||
278 | function 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 | ||
280 | export { | 292 | export { |
@@ -298,5 +310,7 @@ export { | |||
298 | 310 | ||
299 | reorderVideosPlaylist, | 311 | reorderVideosPlaylist, |
300 | 312 | ||
301 | checkPlaylistFilesWereRemoved | 313 | checkPlaylistFilesWereRemoved, |
314 | |||
315 | doVideosExistInMyPlaylist | ||
302 | } | 316 | } |