From 1ca9f7c3f7afac2af4c4c25b98426731f7e789c6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 20 Aug 2019 19:05:31 +0200 Subject: Type toFormattedJSON --- server/lib/video-channel.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'server/lib/video-channel.ts') diff --git a/server/lib/video-channel.ts b/server/lib/video-channel.ts index ee8eb6568..41eab456b 100644 --- a/server/lib/video-channel.ts +++ b/server/lib/video-channel.ts @@ -4,12 +4,12 @@ import { VideoChannelCreate } from '../../shared/models' import { VideoChannelModel } from '../models/video/video-channel' import { buildActorInstance, federateVideoIfNeeded, getVideoChannelActivityPubUrl } from './activitypub' import { VideoModel } from '../models/video/video' -import { MAccountId, MChannelActor, MChannelId } from '../typings/models' +import { MAccountId, MChannelDefault, MChannelId } from '../typings/models' -type CustomVideoChannelModelAccount = MChannelActor & +type CustomVideoChannelModelAccount = MChannelDefault & { Account?: T } -async function createVideoChannel ( +async function createLocalVideoChannel ( videoChannelInfo: VideoChannelCreate, account: T, t: Sequelize.Transaction @@ -31,7 +31,7 @@ async function createVideoChannel ( const videoChannel = new VideoChannelModel(videoChannelData) const options = { transaction: t } - const videoChannelCreated: CustomVideoChannelModelAccount = await videoChannel.save(options) as MChannelActor + const videoChannelCreated: CustomVideoChannelModelAccount = await videoChannel.save(options) as MChannelDefault // Do not forget to add Account/Actor information to the created video channel videoChannelCreated.Account = account @@ -54,6 +54,6 @@ async function federateAllVideosOfChannel (videoChannel: MChannelId) { // --------------------------------------------------------------------------- export { - createVideoChannel, + createLocalVideoChannel, federateAllVideosOfChannel } -- cgit v1.2.3