diff options
author | Chocobozzz <me@florianbigard.com> | 2019-03-19 09:26:50 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-03-19 09:26:50 +0100 |
commit | 0f6acda11681de90d38dd18669863c6e270851ee (patch) | |
tree | b3b28e00d539645f5a810202dc8afada289e7b2e /server/middlewares/validators/users.ts | |
parent | 9a18a6252071cf21b18f82a24bb63078abb75bc1 (diff) | |
download | PeerTube-0f6acda11681de90d38dd18669863c6e270851ee.tar.gz PeerTube-0f6acda11681de90d38dd18669863c6e270851ee.tar.zst PeerTube-0f6acda11681de90d38dd18669863c6e270851ee.zip |
Does exist
Diffstat (limited to 'server/middlewares/validators/users.ts')
-rw-r--r-- | server/middlewares/validators/users.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts index a52e3060a..5e8c8c29b 100644 --- a/server/middlewares/validators/users.ts +++ b/server/middlewares/validators/users.ts | |||
@@ -16,7 +16,7 @@ import { | |||
16 | isUserVideoQuotaDailyValid, | 16 | isUserVideoQuotaDailyValid, |
17 | isUserVideoQuotaValid, isUserVideosHistoryEnabledValid | 17 | isUserVideoQuotaValid, isUserVideosHistoryEnabledValid |
18 | } from '../../helpers/custom-validators/users' | 18 | } from '../../helpers/custom-validators/users' |
19 | import { isVideoExist } from '../../helpers/custom-validators/videos' | 19 | import { doesVideoExist } from '../../helpers/custom-validators/videos' |
20 | import { logger } from '../../helpers/logger' | 20 | import { logger } from '../../helpers/logger' |
21 | import { isSignupAllowed, isSignupAllowedForCurrentIP } from '../../helpers/signup' | 21 | import { isSignupAllowed, isSignupAllowedForCurrentIP } from '../../helpers/signup' |
22 | import { Redis } from '../../lib/redis' | 22 | import { Redis } from '../../lib/redis' |
@@ -194,7 +194,7 @@ const usersVideoRatingValidator = [ | |||
194 | logger.debug('Checking usersVideoRating parameters', { parameters: req.params }) | 194 | logger.debug('Checking usersVideoRating parameters', { parameters: req.params }) |
195 | 195 | ||
196 | if (areValidationErrors(req, res)) return | 196 | if (areValidationErrors(req, res)) return |
197 | if (!await isVideoExist(req.params.videoId, res, 'id')) return | 197 | if (!await doesVideoExist(req.params.videoId, res, 'id')) return |
198 | 198 | ||
199 | return next() | 199 | return next() |
200 | } | 200 | } |