From d5d9b6d7bfb7e9426b6462f7fdf285df39eea820 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 21 Oct 2019 14:50:55 +0200 Subject: Update server dependencies --- server/middlewares/validators/videos/video-comments.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'server/middlewares/validators/videos') diff --git a/server/middlewares/validators/videos/video-comments.ts b/server/middlewares/validators/videos/video-comments.ts index 8adbb02ba..1d81eb5d8 100644 --- a/server/middlewares/validators/videos/video-comments.ts +++ b/server/middlewares/validators/videos/video-comments.ts @@ -120,7 +120,8 @@ export { // --------------------------------------------------------------------------- -async function doesVideoCommentThreadExist (id: number, video: MVideoId, res: express.Response) { +async function doesVideoCommentThreadExist (idArg: number | string, video: MVideoId, res: express.Response) { + const id = parseInt(idArg + '', 10) const videoComment = await VideoCommentModel.loadById(id) if (!videoComment) { @@ -151,7 +152,8 @@ async function doesVideoCommentThreadExist (id: number, video: MVideoId, res: ex return true } -async function doesVideoCommentExist (id: number, video: MVideoId, res: express.Response) { +async function doesVideoCommentExist (idArg: number | string, video: MVideoId, res: express.Response) { + const id = parseInt(idArg + '', 10) const videoComment = await VideoCommentModel.loadByIdAndPopulateVideoAndAccountAndReply(id) if (!videoComment) { -- cgit v1.2.3