diff options
author | Chocobozzz <me@florianbigard.com> | 2019-07-23 10:40:39 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-07-24 10:58:16 +0200 |
commit | 3e753302d8c911b59971c16a8018df0e1ab78465 (patch) | |
tree | efce7ece3273589228c5c948ea6757b2bdf65429 /server/middlewares/validators/redundancy.ts | |
parent | a8b666e9f1ed002230869606308749614390c82f (diff) | |
download | PeerTube-3e753302d8c911b59971c16a8018df0e1ab78465.tar.gz PeerTube-3e753302d8c911b59971c16a8018df0e1ab78465.tar.zst PeerTube-3e753302d8c911b59971c16a8018df0e1ab78465.zip |
Refactor middleware helpers
Diffstat (limited to 'server/middlewares/validators/redundancy.ts')
-rw-r--r-- | server/middlewares/validators/redundancy.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/middlewares/validators/redundancy.ts b/server/middlewares/validators/redundancy.ts index 76cf89c40..edc53a6b2 100644 --- a/server/middlewares/validators/redundancy.ts +++ b/server/middlewares/validators/redundancy.ts | |||
@@ -2,12 +2,12 @@ import * as express from 'express' | |||
2 | import 'express-validator' | 2 | import 'express-validator' |
3 | import { body, param } from 'express-validator/check' | 3 | import { body, param } from 'express-validator/check' |
4 | import { exists, isBooleanValid, isIdOrUUIDValid, toIntOrNull } from '../../helpers/custom-validators/misc' | 4 | import { exists, isBooleanValid, isIdOrUUIDValid, toIntOrNull } from '../../helpers/custom-validators/misc' |
5 | import { doesVideoExist } from '../../helpers/custom-validators/videos' | ||
6 | import { logger } from '../../helpers/logger' | 5 | import { logger } from '../../helpers/logger' |
7 | import { areValidationErrors } from './utils' | 6 | import { areValidationErrors } from './utils' |
8 | import { VideoRedundancyModel } from '../../models/redundancy/video-redundancy' | 7 | import { VideoRedundancyModel } from '../../models/redundancy/video-redundancy' |
9 | import { isHostValid } from '../../helpers/custom-validators/servers' | 8 | import { isHostValid } from '../../helpers/custom-validators/servers' |
10 | import { ServerModel } from '../../models/server/server' | 9 | import { ServerModel } from '../../models/server/server' |
10 | import { doesVideoExist } from '../../helpers/middlewares' | ||
11 | 11 | ||
12 | const videoFileRedundancyGetValidator = [ | 12 | const videoFileRedundancyGetValidator = [ |
13 | param('videoId').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid video id'), | 13 | param('videoId').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid video id'), |