X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fcustom-validators%2Fvideo-comments.ts;h=455ff424110442bfd166554ba41d4ef5cba8b278;hb=310b5219b38427f0c2c7ba57225afdd8f3064380;hp=a01680cbee10b7b3ad2fefddebb829a4c32434cc;hpb=57f6896f67cfc570cf3605dd94b0778101b2d9b9;p=github%2FChocobozzz%2FPeerTube.git 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 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 }