1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Optimize SQL requests of videos AP endpoints

This commit is contained in:
Chocobozzz 2018-09-19 10:16:44 +02:00
parent ad76628b17
commit 96f29c0f6d
No known key found for this signature in database
GPG key ID: 583A612D890159BE
7 changed files with 56 additions and 44 deletions

View file

@ -78,7 +78,7 @@ const videoCommentGetValidator = [
logger.debug('Checking videoCommentGetValidator parameters.', { parameters: req.params })
if (areValidationErrors(req, res)) return
if (!await isVideoExist(req.params.videoId, res)) return
if (!await isVideoExist(req.params.videoId, res, 'id')) return
if (!await isVideoCommentExist(req.params.commentId, res.locals.video, res)) return
return next()