diff options
Diffstat (limited to 'server/middlewares/validators/videos/video-rates.ts')
-rw-r--r-- | server/middlewares/validators/videos/video-rates.ts | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/server/middlewares/validators/videos/video-rates.ts b/server/middlewares/validators/videos/video-rates.ts index 0c02baafb..275634d5b 100644 --- a/server/middlewares/validators/videos/video-rates.ts +++ b/server/middlewares/validators/videos/video-rates.ts | |||
@@ -6,7 +6,6 @@ import { isAccountNameValid } from '../../../helpers/custom-validators/accounts' | |||
6 | import { isIdValid } from '../../../helpers/custom-validators/misc' | 6 | import { isIdValid } from '../../../helpers/custom-validators/misc' |
7 | import { isRatingValid } from '../../../helpers/custom-validators/video-rates' | 7 | import { isRatingValid } from '../../../helpers/custom-validators/video-rates' |
8 | import { isVideoRatingTypeValid } from '../../../helpers/custom-validators/videos' | 8 | import { isVideoRatingTypeValid } from '../../../helpers/custom-validators/videos' |
9 | import { logger } from '../../../helpers/logger' | ||
10 | import { AccountVideoRateModel } from '../../../models/account/account-video-rate' | 9 | import { AccountVideoRateModel } from '../../../models/account/account-video-rate' |
11 | import { areValidationErrors, checkCanSeeVideo, doesVideoExist, isValidVideoIdParam } from '../shared' | 10 | import { areValidationErrors, checkCanSeeVideo, doesVideoExist, isValidVideoIdParam } from '../shared' |
12 | 11 | ||
@@ -17,8 +16,6 @@ const videoUpdateRateValidator = [ | |||
17 | .custom(isVideoRatingTypeValid), | 16 | .custom(isVideoRatingTypeValid), |
18 | 17 | ||
19 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { | 18 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { |
20 | logger.debug('Checking videoRate parameters', { parameters: req.body }) | ||
21 | |||
22 | if (areValidationErrors(req, res)) return | 19 | if (areValidationErrors(req, res)) return |
23 | if (!await doesVideoExist(req.params.id, res)) return | 20 | if (!await doesVideoExist(req.params.id, res)) return |
24 | 21 | ||
@@ -36,8 +33,6 @@ const getAccountVideoRateValidatorFactory = function (rateType: VideoRateType) { | |||
36 | .custom(isIdValid), | 33 | .custom(isIdValid), |
37 | 34 | ||
38 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { | 35 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { |
39 | logger.debug('Checking videoCommentGetValidator parameters.', { parameters: req.params }) | ||
40 | |||
41 | if (areValidationErrors(req, res)) return | 36 | if (areValidationErrors(req, res)) return |
42 | 37 | ||
43 | const rate = await AccountVideoRateModel.loadLocalAndPopulateVideo(rateType, req.params.name, +req.params.videoId) | 38 | const rate = await AccountVideoRateModel.loadLocalAndPopulateVideo(rateType, req.params.name, +req.params.videoId) |
@@ -61,8 +56,6 @@ const videoRatingValidator = [ | |||
61 | .custom(isRatingValid).withMessage('Value must be one of "like" or "dislike"'), | 56 | .custom(isRatingValid).withMessage('Value must be one of "like" or "dislike"'), |
62 | 57 | ||
63 | (req: express.Request, res: express.Response, next: express.NextFunction) => { | 58 | (req: express.Request, res: express.Response, next: express.NextFunction) => { |
64 | logger.debug('Checking rating parameter', { parameters: req.params }) | ||
65 | |||
66 | if (areValidationErrors(req, res)) return | 59 | if (areValidationErrors(req, res)) return |
67 | 60 | ||
68 | return next() | 61 | return next() |