aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/video-comments.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-09-19 10:16:44 +0200
committerChocobozzz <me@florianbigard.com>2018-09-19 10:20:38 +0200
commit96f29c0f6d2e623fb088e88200934c5df8da9924 (patch)
treef11e52c12f56733bef70ac7bbde5179c5a5ecc40 /server/middlewares/validators/video-comments.ts
parentad76628b17ff8f25d3402d6d669b274116bbf76c (diff)
downloadPeerTube-96f29c0f6d2e623fb088e88200934c5df8da9924.tar.gz
PeerTube-96f29c0f6d2e623fb088e88200934c5df8da9924.tar.zst
PeerTube-96f29c0f6d2e623fb088e88200934c5df8da9924.zip
Optimize SQL requests of videos AP endpoints
Diffstat (limited to 'server/middlewares/validators/video-comments.ts')
-rw-r--r--server/middlewares/validators/video-comments.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/middlewares/validators/video-comments.ts b/server/middlewares/validators/video-comments.ts
index 4b15eed23..693852499 100644
--- a/server/middlewares/validators/video-comments.ts
+++ b/server/middlewares/validators/video-comments.ts
@@ -78,7 +78,7 @@ const videoCommentGetValidator = [
78 logger.debug('Checking videoCommentGetValidator parameters.', { parameters: req.params }) 78 logger.debug('Checking videoCommentGetValidator parameters.', { parameters: req.params })
79 79
80 if (areValidationErrors(req, res)) return 80 if (areValidationErrors(req, res)) return
81 if (!await isVideoExist(req.params.videoId, res)) return 81 if (!await isVideoExist(req.params.videoId, res, 'id')) return
82 if (!await isVideoCommentExist(req.params.commentId, res.locals.video, res)) return 82 if (!await isVideoCommentExist(req.params.commentId, res.locals.video, res)) return
83 83
84 return next() 84 return next()