diff options
Diffstat (limited to 'server/helpers')
-rw-r--r-- | server/helpers/custom-validators/video-channels.ts | 6 |
1 files changed, 3 insertions, 3 deletions
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 | |||
26 | return processVideoChannelExist(videoChannel, res) | 26 | return processVideoChannelExist(videoChannel, res) |
27 | } | 27 | } |
28 | 28 | ||
29 | async function isVideoChannelIdExist (id: string, res: express.Response) { | 29 | async function isVideoChannelIdExist (id: number | string, res: express.Response) { |
30 | let videoChannel: VideoChannelModel | 30 | let videoChannel: VideoChannelModel |
31 | if (validator.isInt(id)) { | 31 | if (validator.isInt('' + id)) { |
32 | videoChannel = await VideoChannelModel.loadAndPopulateAccount(+id) | 32 | videoChannel = await VideoChannelModel.loadAndPopulateAccount(+id) |
33 | } else { // UUID | 33 | } else { // UUID |
34 | videoChannel = await VideoChannelModel.loadByUUIDAndPopulateAccount(id) | 34 | videoChannel = await VideoChannelModel.loadByUUIDAndPopulateAccount('' + id) |
35 | } | 35 | } |
36 | 36 | ||
37 | return processVideoChannelExist(videoChannel, res) | 37 | return processVideoChannelExist(videoChannel, res) |