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 --- server/controllers/activitypub/client.ts | 2 +- server/controllers/api/users/my-video-playlists.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'server/controllers') 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) { async function actorPlaylists (req: express.Request, account: AccountModel) { const handler = (start: number, count: number) => { - return VideoPlaylistModel.listUrlsOfForAP(account.id, start, count) + return VideoPlaylistModel.listPublicUrlsOfForAP(account.id, start, count) } 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 { // --------------------------------------------------------------------------- async function doVideosInPlaylistExist (req: express.Request, res: express.Response) { - const videoIds = req.query.videoIds as number[] + const videoIds = req.query.videoIds.map(i => parseInt(i + '', 10)) const user = res.locals.oauth.token.User as UserModel const results = await VideoPlaylistModel.listPlaylistIdsOf(user.Account.id, videoIds) -- cgit v1.2.3