X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Fvideo%2Fvideo-channel.ts;h=54f12dce3216273d17925ea1e2eaca21e1f9ebc2;hb=c893d4514e6ecbf282c7985fe5f82b8acd8a1137;hp=e11268b2c2d1e926636ccce0377adc904511e194;hpb=4e50b6a1c9a3eb261e04ede73241648e6edf21d6;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts index e11268b2c..54f12dce3 100644 --- a/server/models/video/video-channel.ts +++ b/server/models/video/video-channel.ts @@ -1,6 +1,5 @@ import * as Sequelize from 'sequelize' import { isVideoChannelDescriptionValid, isVideoChannelNameValid } from '../../helpers' -import { isVideoChannelUrlValid } from '../../helpers/custom-validators/video-channels' import { CONSTRAINTS_FIELDS } from '../../initializers/constants' import { sendDeleteVideoChannel } from '../../lib/activitypub/send/send-delete' @@ -8,6 +7,7 @@ import { addMethodsToModel, getSort } from '../utils' import { VideoChannelAttributes, VideoChannelInstance, VideoChannelMethods } from './video-channel-interface' import { getAnnounceActivityPubUrl } from '../../lib/activitypub/url' import { activityPubCollection } from '../../helpers/activitypub' +import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' let VideoChannel: Sequelize.Model let toFormattedJSON: VideoChannelMethods.ToFormattedJSON @@ -66,7 +66,7 @@ export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.Da allowNull: false, validate: { urlValid: value => { - const res = isVideoChannelUrlValid(value) + const res = isActivityPubUrlValid(value) if (res === false) throw new Error('Video channel URL is not valid.') } }