diff options
Diffstat (limited to 'server/middlewares/validators/videos/video-watch.ts')
-rw-r--r-- | server/middlewares/validators/videos/video-watch.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/middlewares/validators/videos/video-watch.ts b/server/middlewares/validators/videos/video-watch.ts index c38ad8a10..a3b70c0cc 100644 --- a/server/middlewares/validators/videos/video-watch.ts +++ b/server/middlewares/validators/videos/video-watch.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { body, param } from 'express-validator/check' | 1 | import { body, param } from 'express-validator/check' |
2 | import * as express from 'express' | 2 | import * as express from 'express' |
3 | import { isIdOrUUIDValid } from '../../../helpers/custom-validators/misc' | 3 | import { isIdOrUUIDValid } from '../../../helpers/custom-validators/misc' |
4 | import { isVideoExist } from '../../../helpers/custom-validators/videos' | 4 | import { doesVideoExist } from '../../../helpers/custom-validators/videos' |
5 | import { areValidationErrors } from '../utils' | 5 | import { areValidationErrors } from '../utils' |
6 | import { logger } from '../../../helpers/logger' | 6 | import { logger } from '../../../helpers/logger' |
7 | import { UserModel } from '../../../models/account/user' | 7 | import { UserModel } from '../../../models/account/user' |
@@ -16,7 +16,7 @@ const videoWatchingValidator = [ | |||
16 | logger.debug('Checking videoWatching parameters', { parameters: req.body }) | 16 | logger.debug('Checking videoWatching parameters', { parameters: req.body }) |
17 | 17 | ||
18 | if (areValidationErrors(req, res)) return | 18 | if (areValidationErrors(req, res)) return |
19 | if (!await isVideoExist(req.params.videoId, res, 'id')) return | 19 | if (!await doesVideoExist(req.params.videoId, res, 'id')) return |
20 | 20 | ||
21 | const user = res.locals.oauth.token.User as UserModel | 21 | const user = res.locals.oauth.token.User as UserModel |
22 | if (user.videosHistoryEnabled === false) { | 22 | if (user.videosHistoryEnabled === false) { |