From a4f99a766bd07851a37dd7ff8fed7acc2a3ef021 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 23 May 2018 11:38:00 +0200 Subject: Add owner in video channel page --- server/models/video/video-channel.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'server/models/video/video-channel.ts') 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 { [ScopeNames.WITH_ACCOUNT]: { include: [ { - model: () => AccountModel, + model: () => AccountModel.unscoped(), required: true, include: [ { - model: () => ActorModel, + model: () => ActorModel.unscoped(), required: true } ] @@ -247,12 +247,7 @@ export class VideoChannelModel extends Model { videos: undefined } - if (this.Account) { - videoChannel.ownerAccount = { - id: this.Account.id, - uuid: this.Account.Actor.uuid - } - } + if (this.Account) videoChannel.ownerAccount = this.Account.toFormattedJSON() return Object.assign(actor, videoChannel) } -- cgit v1.2.3