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)
return false
}
- res.locals.videoComment = videoComment
+ res.locals.videoCommentFull = videoComment
return true
}