aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
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 /server/controllers
parente2f01c47e08d26a30ad47068d195b3d21d0df8a1 (diff)
downloadPeerTube-0b16f5f2202e0c0832b5e678fadd95c64b8e8789.tar.gz
PeerTube-0b16f5f2202e0c0832b5e678fadd95c64b8e8789.tar.zst
PeerTube-0b16f5f2202e0c0832b5e678fadd95c64b8e8789.zip
Add videos playlist exist tests
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/activitypub/client.ts2
-rw-r--r--server/controllers/api/users/my-video-playlists.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/activitypub/client.ts b/server/controllers/activitypub/client.ts
index 0d1dff96f..f1217f6db 100644
--- a/server/controllers/activitypub/client.ts
+++ b/server/controllers/activitypub/client.ts
@@ -357,7 +357,7 @@ async function actorFollowers (req: express.Request, actor: ActorModel) {
357 357
358async function actorPlaylists (req: express.Request, account: AccountModel) { 358async function actorPlaylists (req: express.Request, account: AccountModel) {
359 const handler = (start: number, count: number) => { 359 const handler = (start: number, count: number) => {
360 return VideoPlaylistModel.listUrlsOfForAP(account.id, start, count) 360 return VideoPlaylistModel.listPublicUrlsOfForAP(account.id, start, count)
361 } 361 }
362 362
363 return activityPubCollectionPagination(CONFIG.WEBSERVER.URL + req.path, handler, req.query.page) 363 return activityPubCollectionPagination(CONFIG.WEBSERVER.URL + req.path, handler, req.query.page)
diff --git a/server/controllers/api/users/my-video-playlists.ts b/server/controllers/api/users/my-video-playlists.ts
index 1ec175f64..42da02bff 100644
--- a/server/controllers/api/users/my-video-playlists.ts
+++ b/server/controllers/api/users/my-video-playlists.ts
@@ -22,7 +22,7 @@ export {
22// --------------------------------------------------------------------------- 22// ---------------------------------------------------------------------------
23 23
24async function doVideosInPlaylistExist (req: express.Request, res: express.Response) { 24async function doVideosInPlaylistExist (req: express.Request, res: express.Response) {
25 const videoIds = req.query.videoIds as number[] 25 const videoIds = req.query.videoIds.map(i => parseInt(i + '', 10))
26 const user = res.locals.oauth.token.User as UserModel 26 const user = res.locals.oauth.token.User as UserModel
27 27
28 const results = await VideoPlaylistModel.listPlaylistIdsOf(user.Account.id, videoIds) 28 const results = await VideoPlaylistModel.listPlaylistIdsOf(user.Account.id, videoIds)