From 03e12d7c4954e1071fdeb7ef362ea5c3965d4075 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 25 Apr 2018 14:32:19 +0200 Subject: Add account link in videos list --- server/models/video/video.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'server/models') diff --git a/server/models/video/video.ts b/server/models/video/video.ts index f23fac2ab..ea466fccd 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -104,13 +104,13 @@ enum ScopeNames { videoChannelId?: number }) => { const accountInclude = { - attributes: [ 'name' ], + attributes: [ 'id', 'name' ], model: AccountModel.unscoped(), required: true, where: {}, include: [ { - attributes: [ 'preferredUsername', 'url', 'serverId', 'avatarId' ], + attributes: [ 'id', 'uuid', 'preferredUsername', 'url', 'serverId', 'avatarId' ], model: ActorModel.unscoped(), required: true, where: VideoModel.buildActorWhereWithFilter(options.filter), @@ -1078,6 +1078,8 @@ export class VideoModel extends Model { updatedAt: this.updatedAt, publishedAt: this.publishedAt, account: { + id: formattedAccount.id, + uuid: formattedAccount.uuid, name: formattedAccount.name, displayName: formattedAccount.displayName, url: formattedAccount.url, -- cgit v1.2.3