aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators/video-channels.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-14 10:57:56 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-27 19:40:51 +0100
commite34c85e527100c0b5c44567bd951e95be41b8d7e (patch)
tree39697c5a4dda2c2e07142a8522538db783fce2fd /server/helpers/custom-validators/video-channels.ts
parent1e1265b36c09df1465aa2b4866815c957b6a532e (diff)
downloadPeerTube-e34c85e527100c0b5c44567bd951e95be41b8d7e.tar.gz
PeerTube-e34c85e527100c0b5c44567bd951e95be41b8d7e.tar.zst
PeerTube-e34c85e527100c0b5c44567bd951e95be41b8d7e.zip
Fix issues on server start
Diffstat (limited to 'server/helpers/custom-validators/video-channels.ts')
-rw-r--r--server/helpers/custom-validators/video-channels.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/server/helpers/custom-validators/video-channels.ts b/server/helpers/custom-validators/video-channels.ts
index acc42f4a4..5787c3850 100644
--- a/server/helpers/custom-validators/video-channels.ts
+++ b/server/helpers/custom-validators/video-channels.ts
@@ -8,9 +8,14 @@ import { database as db, CONSTRAINTS_FIELDS } from '../../initializers'
8import { VideoChannelInstance } from '../../models' 8import { VideoChannelInstance } from '../../models'
9import { logger } from '../logger' 9import { logger } from '../logger'
10import { exists } from './misc' 10import { exists } from './misc'
11import { isActivityPubUrlValid } from './index'
11 12
12const VIDEO_CHANNELS_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.VIDEO_CHANNELS 13const VIDEO_CHANNELS_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.VIDEO_CHANNELS
13 14
15function isVideoChannelUrlValid (value: string) {
16 return isActivityPubUrlValid(value)
17}
18
14function isVideoChannelDescriptionValid (value: string) { 19function isVideoChannelDescriptionValid (value: string) {
15 return value === null || validator.isLength(value, VIDEO_CHANNELS_CONSTRAINTS_FIELDS.DESCRIPTION) 20 return value === null || validator.isLength(value, VIDEO_CHANNELS_CONSTRAINTS_FIELDS.DESCRIPTION)
16} 21}
@@ -53,5 +58,6 @@ export {
53 isVideoChannelDescriptionValid, 58 isVideoChannelDescriptionValid,
54 isVideoChannelNameValid, 59 isVideoChannelNameValid,
55 isVideoChannelUUIDValid, 60 isVideoChannelUUIDValid,
56 checkVideoChannelExists 61 checkVideoChannelExists,
62 isVideoChannelUrlValid
57} 63}