diff options
author | Chocobozzz <me@florianbigard.com> | 2018-04-25 14:32:19 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-04-25 14:32:19 +0200 |
commit | 03e12d7c4954e1071fdeb7ef362ea5c3965d4075 (patch) | |
tree | e77e8e6dbf1ee2fcc1644600af5cc404d685083c /server/models/video | |
parent | 6b738c7a31591a83fdcd9c78b6b1f98e543c378b (diff) | |
download | PeerTube-03e12d7c4954e1071fdeb7ef362ea5c3965d4075.tar.gz PeerTube-03e12d7c4954e1071fdeb7ef362ea5c3965d4075.tar.zst PeerTube-03e12d7c4954e1071fdeb7ef362ea5c3965d4075.zip |
Add account link in videos list
Diffstat (limited to 'server/models/video')
-rw-r--r-- | server/models/video/video.ts | 6 |
1 files changed, 4 insertions, 2 deletions
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 { | |||
104 | videoChannelId?: number | 104 | videoChannelId?: number |
105 | }) => { | 105 | }) => { |
106 | const accountInclude = { | 106 | const accountInclude = { |
107 | attributes: [ 'name' ], | 107 | attributes: [ 'id', 'name' ], |
108 | model: AccountModel.unscoped(), | 108 | model: AccountModel.unscoped(), |
109 | required: true, | 109 | required: true, |
110 | where: {}, | 110 | where: {}, |
111 | include: [ | 111 | include: [ |
112 | { | 112 | { |
113 | attributes: [ 'preferredUsername', 'url', 'serverId', 'avatarId' ], | 113 | attributes: [ 'id', 'uuid', 'preferredUsername', 'url', 'serverId', 'avatarId' ], |
114 | model: ActorModel.unscoped(), | 114 | model: ActorModel.unscoped(), |
115 | required: true, | 115 | required: true, |
116 | where: VideoModel.buildActorWhereWithFilter(options.filter), | 116 | where: VideoModel.buildActorWhereWithFilter(options.filter), |
@@ -1078,6 +1078,8 @@ export class VideoModel extends Model<VideoModel> { | |||
1078 | updatedAt: this.updatedAt, | 1078 | updatedAt: this.updatedAt, |
1079 | publishedAt: this.publishedAt, | 1079 | publishedAt: this.publishedAt, |
1080 | account: { | 1080 | account: { |
1081 | id: formattedAccount.id, | ||
1082 | uuid: formattedAccount.uuid, | ||
1081 | name: formattedAccount.name, | 1083 | name: formattedAccount.name, |
1082 | displayName: formattedAccount.displayName, | 1084 | displayName: formattedAccount.displayName, |
1083 | url: formattedAccount.url, | 1085 | url: formattedAccount.url, |