]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video.ts
Add account link in videos list
[github/Chocobozzz/PeerTube.git] / server / models / video / video.ts
index f23fac2ab1b3da2d2027b6c98b0479bc4d979638..ea466fccd3b3fe78702d639879069cc649437f69 100644 (file)
@@ -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<VideoModel> {
       updatedAt: this.updatedAt,
       publishedAt: this.publishedAt,
       account: {
+        id: formattedAccount.id,
+        uuid: formattedAccount.uuid,
         name: formattedAccount.name,
         displayName: formattedAccount.displayName,
         url: formattedAccount.url,