aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/users.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-03-19 09:26:50 +0100
committerChocobozzz <me@florianbigard.com>2019-03-19 09:26:50 +0100
commit0f6acda11681de90d38dd18669863c6e270851ee (patch)
treeb3b28e00d539645f5a810202dc8afada289e7b2e /server/middlewares/validators/users.ts
parent9a18a6252071cf21b18f82a24bb63078abb75bc1 (diff)
downloadPeerTube-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.ts4
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'
19import { isVideoExist } from '../../helpers/custom-validators/videos' 19import { doesVideoExist } from '../../helpers/custom-validators/videos'
20import { logger } from '../../helpers/logger' 20import { logger } from '../../helpers/logger'
21import { isSignupAllowed, isSignupAllowedForCurrentIP } from '../../helpers/signup' 21import { isSignupAllowed, isSignupAllowedForCurrentIP } from '../../helpers/signup'
22import { Redis } from '../../lib/redis' 22import { 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 }