diff options
Diffstat (limited to 'server/lib/video-channel.ts')
-rw-r--r-- | server/lib/video-channel.ts | 10 |
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 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import { VideoChannelCreate } from '../../shared/models' | 2 | import { VideoChannelCreate } from '../../shared/models' |
3 | import { database as db } from '../initializers' | 3 | import { AccountModel } from '../models/account/account' |
4 | import { AccountInstance } from '../models' | 4 | import { VideoChannelModel } from '../models/video/video-channel' |
5 | import { getVideoChannelActivityPubUrl } from './activitypub/url' | 5 | import { getVideoChannelActivityPubUrl } from './activitypub' |
6 | 6 | ||
7 | async function createVideoChannel (videoChannelInfo: VideoChannelCreate, account: AccountInstance, t: Sequelize.Transaction) { | 7 | async 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 } |