diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-09 17:51:58 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:40:51 +0100 |
commit | e4f97babf701481b55cc10fb3448feab5f97c867 (patch) | |
tree | af37402a594dc5ff09f71ecb0687e8cfe4cdb471 /server/lib/video-channel.ts | |
parent | 343ad675f2a26c15b86150a9a3552e619d5d44f4 (diff) | |
download | PeerTube-e4f97babf701481b55cc10fb3448feab5f97c867.tar.gz PeerTube-e4f97babf701481b55cc10fb3448feab5f97c867.tar.zst PeerTube-e4f97babf701481b55cc10fb3448feab5f97c867.zip |
Begin activitypub
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 678ffe643..a6dd4d061 100644 --- a/server/lib/video-channel.ts +++ b/server/lib/video-channel.ts | |||
@@ -3,15 +3,15 @@ import * as Sequelize from 'sequelize' | |||
3 | import { addVideoChannelToFriends } from './friends' | 3 | import { addVideoChannelToFriends } from './friends' |
4 | import { database as db } from '../initializers' | 4 | import { database as db } from '../initializers' |
5 | import { logger } from '../helpers' | 5 | import { logger } from '../helpers' |
6 | import { AuthorInstance } from '../models' | 6 | import { AccountInstance } from '../models' |
7 | import { VideoChannelCreate } from '../../shared/models' | 7 | import { VideoChannelCreate } from '../../shared/models' |
8 | 8 | ||
9 | async function createVideoChannel (videoChannelInfo: VideoChannelCreate, author: AuthorInstance, t: Sequelize.Transaction) { | 9 | async function createVideoChannel (videoChannelInfo: VideoChannelCreate, account: AccountInstance, t: Sequelize.Transaction) { |
10 | const videoChannelData = { | 10 | const videoChannelData = { |
11 | name: videoChannelInfo.name, | 11 | name: videoChannelInfo.name, |
12 | description: videoChannelInfo.description, | 12 | description: videoChannelInfo.description, |
13 | remote: false, | 13 | remote: false, |
14 | authorId: author.id | 14 | authorId: account.id |
15 | } | 15 | } |
16 | 16 | ||
17 | const videoChannel = db.VideoChannel.build(videoChannelData) | 17 | const videoChannel = db.VideoChannel.build(videoChannelData) |
@@ -19,8 +19,8 @@ async function createVideoChannel (videoChannelInfo: VideoChannelCreate, author: | |||
19 | 19 | ||
20 | const videoChannelCreated = await videoChannel.save(options) | 20 | const videoChannelCreated = await videoChannel.save(options) |
21 | 21 | ||
22 | // Do not forget to add Author information to the created video channel | 22 | // Do not forget to add Account information to the created video channel |
23 | videoChannelCreated.Author = author | 23 | videoChannelCreated.Account = account |
24 | 24 | ||
25 | const remoteVideoChannel = videoChannelCreated.toAddRemoteJSON() | 25 | const remoteVideoChannel = videoChannelCreated.toAddRemoteJSON() |
26 | 26 | ||