diff options
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r-- | server/middlewares/validators/video-channels.ts | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/server/middlewares/validators/video-channels.ts b/server/middlewares/validators/video-channels.ts index 0326e05b9..c6fd3b59d 100644 --- a/server/middlewares/validators/video-channels.ts +++ b/server/middlewares/validators/video-channels.ts | |||
@@ -1,18 +1,13 @@ | |||
1 | import { body, param } from 'express-validator/check' | ||
2 | import * as express from 'express' | 1 | import * as express from 'express' |
3 | 2 | import { body, param } from 'express-validator/check' | |
4 | import { checkErrors } from './utils' | 3 | import { UserRight } from '../../../shared' |
4 | import { checkVideoAccountExists } from '../../helpers/custom-validators/accounts' | ||
5 | import { isVideoChannelDescriptionValid, isVideoChannelNameValid } from '../../helpers/custom-validators/video-channels' | ||
6 | import { checkVideoChannelExists, isIdOrUUIDValid } from '../../helpers/index' | ||
7 | import { logger } from '../../helpers/logger' | ||
5 | import { database as db } from '../../initializers' | 8 | import { database as db } from '../../initializers' |
6 | import { | ||
7 | logger, | ||
8 | isIdOrUUIDValid, | ||
9 | isVideoChannelDescriptionValid, | ||
10 | isVideoChannelNameValid, | ||
11 | checkVideoChannelExists, | ||
12 | checkVideoAccountExists | ||
13 | } from '../../helpers' | ||
14 | import { UserInstance } from '../../models' | 9 | import { UserInstance } from '../../models' |
15 | import { UserRight } from '../../../shared' | 10 | import { checkErrors } from './utils' |
16 | 11 | ||
17 | const listVideoAccountChannelsValidator = [ | 12 | const listVideoAccountChannelsValidator = [ |
18 | param('accountId').custom(isIdOrUUIDValid).withMessage('Should have a valid account id'), | 13 | param('accountId').custom(isIdOrUUIDValid).withMessage('Should have a valid account id'), |