aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators/video-comments.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-07-08 15:51:46 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-07-10 14:02:41 +0200
commit310b5219b38427f0c2c7ba57225afdd8f3064380 (patch)
tree853ff7e4e66425ca47b0999384eeb08ed14b28ff /server/helpers/custom-validators/video-comments.ts
parent811cef146c841ef8530bc812c05dfee77e0f2998 (diff)
downloadPeerTube-310b5219b38427f0c2c7ba57225afdd8f3064380.tar.gz
PeerTube-310b5219b38427f0c2c7ba57225afdd8f3064380.tar.zst
PeerTube-310b5219b38427f0c2c7ba57225afdd8f3064380.zip
Add new abuses tests
Diffstat (limited to 'server/helpers/custom-validators/video-comments.ts')
-rw-r--r--server/helpers/custom-validators/video-comments.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/helpers/custom-validators/video-comments.ts b/server/helpers/custom-validators/video-comments.ts
index a01680cbe..455ff4241 100644
--- a/server/helpers/custom-validators/video-comments.ts
+++ b/server/helpers/custom-validators/video-comments.ts
@@ -68,7 +68,7 @@ async function doesVideoCommentExist (idArg: number | string, video: MVideoId, r
68 68
69async function doesCommentIdExist (idArg: number | string, res: express.Response) { 69async function doesCommentIdExist (idArg: number | string, res: express.Response) {
70 const id = parseInt(idArg + '', 10) 70 const id = parseInt(idArg + '', 10)
71 const videoComment = await VideoCommentModel.loadById(id) 71 const videoComment = await VideoCommentModel.loadByIdAndPopulateVideoAndAccountAndReply(id)
72 72
73 if (!videoComment) { 73 if (!videoComment) {
74 res.status(404) 74 res.status(404)
@@ -77,7 +77,7 @@ async function doesCommentIdExist (idArg: number | string, res: express.Response
77 return false 77 return false
78 } 78 }
79 79
80 res.locals.videoComment = videoComment 80 res.locals.videoCommentFull = videoComment
81 81
82 return true 82 return true
83} 83}