aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-23 18:04:48 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-27 19:40:53 +0100
commitd4f1e94c89336255537b0b82913591f00e716201 (patch)
treec7d18e09a4f53eafc61de8cb0692c020b197512d /server/middlewares/validators
parent8d468a16fd33ec2660c3c59b3f7def53eb0cc4a1 (diff)
downloadPeerTube-d4f1e94c89336255537b0b82913591f00e716201.tar.gz
PeerTube-d4f1e94c89336255537b0b82913591f00e716201.tar.zst
PeerTube-d4f1e94c89336255537b0b82913591f00e716201.zip
Misc cleanup
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r--server/middlewares/validators/video-channels.ts19
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 @@
1import { body, param } from 'express-validator/check'
2import * as express from 'express' 1import * as express from 'express'
3 2import { body, param } from 'express-validator/check'
4import { checkErrors } from './utils' 3import { UserRight } from '../../../shared'
4import { checkVideoAccountExists } from '../../helpers/custom-validators/accounts'
5import { isVideoChannelDescriptionValid, isVideoChannelNameValid } from '../../helpers/custom-validators/video-channels'
6import { checkVideoChannelExists, isIdOrUUIDValid } from '../../helpers/index'
7import { logger } from '../../helpers/logger'
5import { database as db } from '../../initializers' 8import { database as db } from '../../initializers'
6import {
7 logger,
8 isIdOrUUIDValid,
9 isVideoChannelDescriptionValid,
10 isVideoChannelNameValid,
11 checkVideoChannelExists,
12 checkVideoAccountExists
13} from '../../helpers'
14import { UserInstance } from '../../models' 9import { UserInstance } from '../../models'
15import { UserRight } from '../../../shared' 10import { checkErrors } from './utils'
16 11
17const listVideoAccountChannelsValidator = [ 12const 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'),