From 07b1a18aa678d260009a93e36606c5c5f585723d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 28 Feb 2019 11:14:26 +0100 Subject: Add playlist check param tests --- server/helpers/custom-validators/video-channels.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/helpers') diff --git a/server/helpers/custom-validators/video-channels.ts b/server/helpers/custom-validators/video-channels.ts index cbf150e53..3792bbdcc 100644 --- a/server/helpers/custom-validators/video-channels.ts +++ b/server/helpers/custom-validators/video-channels.ts @@ -26,12 +26,12 @@ async function isLocalVideoChannelNameExist (name: string, res: express.Response return processVideoChannelExist(videoChannel, res) } -async function isVideoChannelIdExist (id: string, res: express.Response) { +async function isVideoChannelIdExist (id: number | string, res: express.Response) { let videoChannel: VideoChannelModel - if (validator.isInt(id)) { + if (validator.isInt('' + id)) { videoChannel = await VideoChannelModel.loadAndPopulateAccount(+id) } else { // UUID - videoChannel = await VideoChannelModel.loadByUUIDAndPopulateAccount(id) + videoChannel = await VideoChannelModel.loadByUUIDAndPopulateAccount('' + id) } return processVideoChannelExist(videoChannel, res) -- cgit v1.2.3