X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fcustom-validators%2Fvideo-channels.ts;h=5787c3850cbace61a59be7f62d011ee5cbc1592a;hb=975e6e0e44e2f2b25f804cd48a62e2a8d9e8117a;hp=acc42f4a49e136c4b6f3508b8c7b2b7cb9665f53;hpb=38fa2065831b5f55be0d7f30f19a62c967397208;p=github%2FChocobozzz%2FPeerTube.git 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' import { VideoChannelInstance } from '../../models' import { logger } from '../logger' import { exists } from './misc' +import { isActivityPubUrlValid } from './index' const VIDEO_CHANNELS_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.VIDEO_CHANNELS +function isVideoChannelUrlValid (value: string) { + return isActivityPubUrlValid(value) +} + function isVideoChannelDescriptionValid (value: string) { return value === null || validator.isLength(value, VIDEO_CHANNELS_CONSTRAINTS_FIELDS.DESCRIPTION) } @@ -53,5 +58,6 @@ export { isVideoChannelDescriptionValid, isVideoChannelNameValid, isVideoChannelUUIDValid, - checkVideoChannelExists + checkVideoChannelExists, + isVideoChannelUrlValid }