aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/video-channels.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-05-07 11:31:23 +0200
committerChocobozzz <me@florianbigard.com>2018-05-07 11:31:23 +0200
commit7d8e778ad031873b2bcc273d281baf6559610f71 (patch)
tree5548c06134a8d9f2f574022c9bcb0978b6e4d4ed /server/middlewares/validators/video-channels.ts
parentb0ae905e7b95a218d087d669c74d86a2679174ab (diff)
downloadPeerTube-7d8e778ad031873b2bcc273d281baf6559610f71.tar.gz
PeerTube-7d8e778ad031873b2bcc273d281baf6559610f71.tar.zst
PeerTube-7d8e778ad031873b2bcc273d281baf6559610f71.zip
Fix video channel update/create on empty fields
Diffstat (limited to 'server/middlewares/validators/video-channels.ts')
-rw-r--r--server/middlewares/validators/video-channels.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/server/middlewares/validators/video-channels.ts b/server/middlewares/validators/video-channels.ts
index 3af20a1b4..92c0de419 100644
--- a/server/middlewares/validators/video-channels.ts
+++ b/server/middlewares/validators/video-channels.ts
@@ -4,14 +4,15 @@ import { UserRight } from '../../../shared'
4import { isAccountIdExist } from '../../helpers/custom-validators/accounts' 4import { isAccountIdExist } from '../../helpers/custom-validators/accounts'
5import { isIdOrUUIDValid } from '../../helpers/custom-validators/misc' 5import { isIdOrUUIDValid } from '../../helpers/custom-validators/misc'
6import { 6import {
7 isVideoChannelDescriptionValid, isVideoChannelExist, 7 isVideoChannelDescriptionValid,
8 isVideoChannelNameValid, isVideoChannelSupportValid 8 isVideoChannelExist,
9 isVideoChannelNameValid,
10 isVideoChannelSupportValid
9} from '../../helpers/custom-validators/video-channels' 11} from '../../helpers/custom-validators/video-channels'
10import { logger } from '../../helpers/logger' 12import { logger } from '../../helpers/logger'
11import { UserModel } from '../../models/account/user' 13import { UserModel } from '../../models/account/user'
12import { VideoChannelModel } from '../../models/video/video-channel' 14import { VideoChannelModel } from '../../models/video/video-channel'
13import { areValidationErrors } from './utils' 15import { areValidationErrors } from './utils'
14import { AccountModel } from '../../models/account/account'
15 16
16const listVideoAccountChannelsValidator = [ 17const listVideoAccountChannelsValidator = [
17 param('accountId').custom(isIdOrUUIDValid).withMessage('Should have a valid account id'), 18 param('accountId').custom(isIdOrUUIDValid).withMessage('Should have a valid account id'),