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/api/users/my-video-playlists.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/controllers/api') 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