diff options
Diffstat (limited to 'server/models/video/video-channel.ts')
-rw-r--r-- | server/models/video/video-channel.ts | 4 |
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 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import { isVideoChannelDescriptionValid, isVideoChannelNameValid } from '../../helpers' | 2 | import { isVideoChannelDescriptionValid, isVideoChannelNameValid } from '../../helpers' |
3 | import { isVideoChannelUrlValid } from '../../helpers/custom-validators/video-channels' | ||
4 | import { CONSTRAINTS_FIELDS } from '../../initializers/constants' | 3 | import { CONSTRAINTS_FIELDS } from '../../initializers/constants' |
5 | import { sendDeleteVideoChannel } from '../../lib/activitypub/send/send-delete' | 4 | import { sendDeleteVideoChannel } from '../../lib/activitypub/send/send-delete' |
6 | 5 | ||
@@ -8,6 +7,7 @@ import { addMethodsToModel, getSort } from '../utils' | |||
8 | import { VideoChannelAttributes, VideoChannelInstance, VideoChannelMethods } from './video-channel-interface' | 7 | import { VideoChannelAttributes, VideoChannelInstance, VideoChannelMethods } from './video-channel-interface' |
9 | import { getAnnounceActivityPubUrl } from '../../lib/activitypub/url' | 8 | import { getAnnounceActivityPubUrl } from '../../lib/activitypub/url' |
10 | import { activityPubCollection } from '../../helpers/activitypub' | 9 | import { activityPubCollection } from '../../helpers/activitypub' |
10 | import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' | ||
11 | 11 | ||
12 | let VideoChannel: Sequelize.Model<VideoChannelInstance, VideoChannelAttributes> | 12 | let VideoChannel: Sequelize.Model<VideoChannelInstance, VideoChannelAttributes> |
13 | let toFormattedJSON: VideoChannelMethods.ToFormattedJSON | 13 | let 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 | } |