aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-channel.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video/video-channel.ts')
-rw-r--r--server/models/video/video-channel.ts4
1 files changed, 2 insertions, 2 deletions
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 @@
1import * as Sequelize from 'sequelize' 1import * as Sequelize from 'sequelize'
2import { isVideoChannelDescriptionValid, isVideoChannelNameValid } from '../../helpers' 2import { isVideoChannelDescriptionValid, isVideoChannelNameValid } from '../../helpers'
3import { isVideoChannelUrlValid } from '../../helpers/custom-validators/video-channels'
4import { CONSTRAINTS_FIELDS } from '../../initializers/constants' 3import { CONSTRAINTS_FIELDS } from '../../initializers/constants'
5import { sendDeleteVideoChannel } from '../../lib/activitypub/send/send-delete' 4import { sendDeleteVideoChannel } from '../../lib/activitypub/send/send-delete'
6 5
@@ -8,6 +7,7 @@ import { addMethodsToModel, getSort } from '../utils'
8import { VideoChannelAttributes, VideoChannelInstance, VideoChannelMethods } from './video-channel-interface' 7import { VideoChannelAttributes, VideoChannelInstance, VideoChannelMethods } from './video-channel-interface'
9import { getAnnounceActivityPubUrl } from '../../lib/activitypub/url' 8import { getAnnounceActivityPubUrl } from '../../lib/activitypub/url'
10import { activityPubCollection } from '../../helpers/activitypub' 9import { activityPubCollection } from '../../helpers/activitypub'
10import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc'
11 11
12let VideoChannel: Sequelize.Model<VideoChannelInstance, VideoChannelAttributes> 12let VideoChannel: Sequelize.Model<VideoChannelInstance, VideoChannelAttributes>
13let toFormattedJSON: VideoChannelMethods.ToFormattedJSON 13let toFormattedJSON: VideoChannelMethods.ToFormattedJSON
@@ -66,7 +66,7 @@ export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.Da
66 allowNull: false, 66 allowNull: false,
67 validate: { 67 validate: {
68 urlValid: value => { 68 urlValid: value => {
69 const res = isVideoChannelUrlValid(value) 69 const res = isActivityPubUrlValid(value)
70 if (res === false) throw new Error('Video channel URL is not valid.') 70 if (res === false) throw new Error('Video channel URL is not valid.')
71 } 71 }
72 } 72 }