diff options
author | Chocobozzz <me@florianbigard.com> | 2019-08-20 19:05:31 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-08-20 19:23:10 +0200 |
commit | 1ca9f7c3f7afac2af4c4c25b98426731f7e789c6 (patch) | |
tree | 27fe65c4ea5e9250d2523033d5c65b315bfca23d /server/lib/video-channel.ts | |
parent | 0283eaac2a8e73006c66df3cf5bb9012e37450e5 (diff) | |
download | PeerTube-1ca9f7c3f7afac2af4c4c25b98426731f7e789c6.tar.gz PeerTube-1ca9f7c3f7afac2af4c4c25b98426731f7e789c6.tar.zst PeerTube-1ca9f7c3f7afac2af4c4c25b98426731f7e789c6.zip |
Type toFormattedJSON
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 ee8eb6568..41eab456b 100644 --- a/server/lib/video-channel.ts +++ b/server/lib/video-channel.ts | |||
@@ -4,12 +4,12 @@ import { VideoChannelCreate } from '../../shared/models' | |||
4 | import { VideoChannelModel } from '../models/video/video-channel' | 4 | import { VideoChannelModel } from '../models/video/video-channel' |
5 | import { buildActorInstance, federateVideoIfNeeded, getVideoChannelActivityPubUrl } from './activitypub' | 5 | import { buildActorInstance, federateVideoIfNeeded, getVideoChannelActivityPubUrl } from './activitypub' |
6 | import { VideoModel } from '../models/video/video' | 6 | import { VideoModel } from '../models/video/video' |
7 | import { MAccountId, MChannelActor, MChannelId } from '../typings/models' | 7 | import { MAccountId, MChannelDefault, MChannelId } from '../typings/models' |
8 | 8 | ||
9 | type CustomVideoChannelModelAccount <T extends MAccountId> = MChannelActor & | 9 | type CustomVideoChannelModelAccount <T extends MAccountId> = MChannelDefault & |
10 | { Account?: T } | 10 | { Account?: T } |
11 | 11 | ||
12 | async function createVideoChannel <T extends MAccountId> ( | 12 | async function createLocalVideoChannel <T extends MAccountId> ( |
13 | videoChannelInfo: VideoChannelCreate, | 13 | videoChannelInfo: VideoChannelCreate, |
14 | account: T, | 14 | account: T, |
15 | t: Sequelize.Transaction | 15 | t: Sequelize.Transaction |
@@ -31,7 +31,7 @@ async function createVideoChannel <T extends MAccountId> ( | |||
31 | const videoChannel = new VideoChannelModel(videoChannelData) | 31 | const videoChannel = new VideoChannelModel(videoChannelData) |
32 | 32 | ||
33 | const options = { transaction: t } | 33 | const options = { transaction: t } |
34 | const videoChannelCreated: CustomVideoChannelModelAccount<T> = await videoChannel.save(options) as MChannelActor | 34 | const videoChannelCreated: CustomVideoChannelModelAccount<T> = await videoChannel.save(options) as MChannelDefault |
35 | 35 | ||
36 | // Do not forget to add Account/Actor information to the created video channel | 36 | // Do not forget to add Account/Actor information to the created video channel |
37 | videoChannelCreated.Account = account | 37 | videoChannelCreated.Account = account |
@@ -54,6 +54,6 @@ async function federateAllVideosOfChannel (videoChannel: MChannelId) { | |||
54 | // --------------------------------------------------------------------------- | 54 | // --------------------------------------------------------------------------- |
55 | 55 | ||
56 | export { | 56 | export { |
57 | createVideoChannel, | 57 | createLocalVideoChannel, |
58 | federateAllVideosOfChannel | 58 | federateAllVideosOfChannel |
59 | } | 59 | } |