diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-14 10:57:56 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:40:51 +0100 |
commit | e34c85e527100c0b5c44567bd951e95be41b8d7e (patch) | |
tree | 39697c5a4dda2c2e07142a8522538db783fce2fd /server/helpers/custom-validators/video-channels.ts | |
parent | 1e1265b36c09df1465aa2b4866815c957b6a532e (diff) | |
download | PeerTube-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.ts | 8 |
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' | |||
8 | import { VideoChannelInstance } from '../../models' | 8 | import { VideoChannelInstance } from '../../models' |
9 | import { logger } from '../logger' | 9 | import { logger } from '../logger' |
10 | import { exists } from './misc' | 10 | import { exists } from './misc' |
11 | import { isActivityPubUrlValid } from './index' | ||
11 | 12 | ||
12 | const VIDEO_CHANNELS_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.VIDEO_CHANNELS | 13 | const VIDEO_CHANNELS_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.VIDEO_CHANNELS |
13 | 14 | ||
15 | function isVideoChannelUrlValid (value: string) { | ||
16 | return isActivityPubUrlValid(value) | ||
17 | } | ||
18 | |||
14 | function isVideoChannelDescriptionValid (value: string) { | 19 | function 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 | } |