]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/custom-validators/video-comments.ts
Add new abuses tests
[github/Chocobozzz/PeerTube.git] / server / helpers / custom-validators / video-comments.ts
index a01680cbee10b7b3ad2fefddebb829a4c32434cc..455ff424110442bfd166554ba41d4ef5cba8b278 100644 (file)
@@ -68,7 +68,7 @@ async function doesVideoCommentExist (idArg: number | string, video: MVideoId, r
 
 async function doesCommentIdExist (idArg: number | string, res: express.Response) {
   const id = parseInt(idArg + '', 10)
-  const videoComment = await VideoCommentModel.loadById(id)
+  const videoComment = await VideoCommentModel.loadByIdAndPopulateVideoAndAccountAndReply(id)
 
   if (!videoComment) {
     res.status(404)
@@ -77,7 +77,7 @@ async function doesCommentIdExist (idArg: number | string, res: express.Response
     return false
   }
 
-  res.locals.videoComment = videoComment
+  res.locals.videoCommentFull = videoComment
 
   return true
 }