aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/video-channel.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/video-channel.ts')
-rw-r--r--server/lib/video-channel.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/lib/video-channel.ts b/server/lib/video-channel.ts
index beb01da9b..97924aa9e 100644
--- a/server/lib/video-channel.ts
+++ b/server/lib/video-channel.ts
@@ -1,10 +1,10 @@
1import * as Sequelize from 'sequelize' 1import * as Sequelize from 'sequelize'
2import { VideoChannelCreate } from '../../shared/models' 2import { VideoChannelCreate } from '../../shared/models'
3import { database as db } from '../initializers' 3import { AccountModel } from '../models/account/account'
4import { AccountInstance } from '../models' 4import { VideoChannelModel } from '../models/video/video-channel'
5import { getVideoChannelActivityPubUrl } from './activitypub/url' 5import { getVideoChannelActivityPubUrl } from './activitypub'
6 6
7async function createVideoChannel (videoChannelInfo: VideoChannelCreate, account: AccountInstance, t: Sequelize.Transaction) { 7async function createVideoChannel (videoChannelInfo: VideoChannelCreate, account: AccountModel, t: Sequelize.Transaction) {
8 const videoChannelData = { 8 const videoChannelData = {
9 name: videoChannelInfo.name, 9 name: videoChannelInfo.name,
10 description: videoChannelInfo.description, 10 description: videoChannelInfo.description,
@@ -12,7 +12,7 @@ async function createVideoChannel (videoChannelInfo: VideoChannelCreate, account
12 accountId: account.id 12 accountId: account.id
13 } 13 }
14 14
15 const videoChannel = db.VideoChannel.build(videoChannelData) 15 const videoChannel = VideoChannelModel.build(videoChannelData)
16 videoChannel.set('url', getVideoChannelActivityPubUrl(videoChannel)) 16 videoChannel.set('url', getVideoChannelActivityPubUrl(videoChannel))
17 17
18 const options = { transaction: t } 18 const options = { transaction: t }