diff options
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 | } |