diff options
Diffstat (limited to 'server/middlewares/validators/videos/video-rates.ts')
-rw-r--r-- | server/middlewares/validators/videos/video-rates.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/middlewares/validators/videos/video-rates.ts b/server/middlewares/validators/videos/video-rates.ts index 204b4a78d..5bb3f4a51 100644 --- a/server/middlewares/validators/videos/video-rates.ts +++ b/server/middlewares/validators/videos/video-rates.ts | |||
@@ -3,12 +3,13 @@ import 'express-validator' | |||
3 | import { body, param, query } from 'express-validator/check' | 3 | import { body, param, query } from 'express-validator/check' |
4 | import { isIdOrUUIDValid } from '../../../helpers/custom-validators/misc' | 4 | import { isIdOrUUIDValid } from '../../../helpers/custom-validators/misc' |
5 | import { isRatingValid } from '../../../helpers/custom-validators/video-rates' | 5 | import { isRatingValid } from '../../../helpers/custom-validators/video-rates' |
6 | import { doesVideoExist, isVideoRatingTypeValid } from '../../../helpers/custom-validators/videos' | 6 | import { isVideoRatingTypeValid } from '../../../helpers/custom-validators/videos' |
7 | import { logger } from '../../../helpers/logger' | 7 | import { logger } from '../../../helpers/logger' |
8 | import { areValidationErrors } from '../utils' | 8 | import { areValidationErrors } from '../utils' |
9 | import { AccountVideoRateModel } from '../../../models/account/account-video-rate' | 9 | import { AccountVideoRateModel } from '../../../models/account/account-video-rate' |
10 | import { VideoRateType } from '../../../../shared/models/videos' | 10 | import { VideoRateType } from '../../../../shared/models/videos' |
11 | import { isAccountNameValid } from '../../../helpers/custom-validators/accounts' | 11 | import { isAccountNameValid } from '../../../helpers/custom-validators/accounts' |
12 | import { doesVideoExist } from '../../../helpers/middlewares' | ||
12 | 13 | ||
13 | const videoUpdateRateValidator = [ | 14 | const videoUpdateRateValidator = [ |
14 | param('id').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid id'), | 15 | param('id').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid id'), |