aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-channel.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-05-23 11:38:00 +0200
committerChocobozzz <me@florianbigard.com>2018-05-23 11:38:18 +0200
commita4f99a766bd07851a37dd7ff8fed7acc2a3ef021 (patch)
tree825ae223689f9b6df1553da0f67f44802b1fe4ca /server/models/video/video-channel.ts
parentb851dabf78d0a7ffad64913498c1f9cd37f16268 (diff)
downloadPeerTube-a4f99a766bd07851a37dd7ff8fed7acc2a3ef021.tar.gz
PeerTube-a4f99a766bd07851a37dd7ff8fed7acc2a3ef021.tar.zst
PeerTube-a4f99a766bd07851a37dd7ff8fed7acc2a3ef021.zip
Add owner in video channel page
Diffstat (limited to 'server/models/video/video-channel.ts')
-rw-r--r--server/models/video/video-channel.ts11
1 files changed, 3 insertions, 8 deletions
diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts
index 8498143fe..b9df14eca 100644
--- a/server/models/video/video-channel.ts
+++ b/server/models/video/video-channel.ts
@@ -34,11 +34,11 @@ enum ScopeNames {
34 [ScopeNames.WITH_ACCOUNT]: { 34 [ScopeNames.WITH_ACCOUNT]: {
35 include: [ 35 include: [
36 { 36 {
37 model: () => AccountModel, 37 model: () => AccountModel.unscoped(),
38 required: true, 38 required: true,
39 include: [ 39 include: [
40 { 40 {
41 model: () => ActorModel, 41 model: () => ActorModel.unscoped(),
42 required: true 42 required: true
43 } 43 }
44 ] 44 ]
@@ -247,12 +247,7 @@ export class VideoChannelModel extends Model<VideoChannelModel> {
247 videos: undefined 247 videos: undefined
248 } 248 }
249 249
250 if (this.Account) { 250 if (this.Account) videoChannel.ownerAccount = this.Account.toFormattedJSON()
251 videoChannel.ownerAccount = {
252 id: this.Account.id,
253 uuid: this.Account.Actor.uuid
254 }
255 }
256 251
257 return Object.assign(actor, videoChannel) 252 return Object.assign(actor, videoChannel)
258 } 253 }