aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/users.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-09-18 12:00:49 +0200
committerChocobozzz <me@florianbigard.com>2018-09-19 09:54:37 +0200
commit627621c1e8d37c33f7b3dd59f4c8907b12c630bc (patch)
tree007e7118f482c543d3898b222b62c185fda4fd2b /server/middlewares/validators/users.ts
parente972e046dbe9b499944c4fab9220eee13e31ac1b (diff)
downloadPeerTube-627621c1e8d37c33f7b3dd59f4c8907b12c630bc.tar.gz
PeerTube-627621c1e8d37c33f7b3dd59f4c8907b12c630bc.tar.zst
PeerTube-627621c1e8d37c33f7b3dd59f4c8907b12c630bc.zip
Optimize SQL requests of watch page API endpoints
Diffstat (limited to 'server/middlewares/validators/users.ts')
-rw-r--r--server/middlewares/validators/users.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts
index d13c50c84..d3ba1ae23 100644
--- a/server/middlewares/validators/users.ts
+++ b/server/middlewares/validators/users.ts
@@ -172,7 +172,7 @@ const usersVideoRatingValidator = [
172 logger.debug('Checking usersVideoRating parameters', { parameters: req.params }) 172 logger.debug('Checking usersVideoRating parameters', { parameters: req.params })
173 173
174 if (areValidationErrors(req, res)) return 174 if (areValidationErrors(req, res)) return
175 if (!await isVideoExist(req.params.videoId, res)) return 175 if (!await isVideoExist(req.params.videoId, res, 'id')) return
176 176
177 return next() 177 return next()
178 } 178 }