]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/account/account.ts
Add video file size info in admin videos list
[github/Chocobozzz/PeerTube.git] / server / models / account / account.ts
index 37194a119bb85b6ff1ecbc8d3919c25e8f1c7f4e..71a9b8ccbcf1df75f52bbe185de04b6fc8916f8b 100644 (file)
@@ -99,7 +99,7 @@ export type SummaryOptions = {
       queryInclude.push({
         attributes: [ 'id' ],
         model: AccountBlocklistModel.unscoped(),
-        as: 'BlockedAccounts',
+        as: 'BlockedBy',
         required: false,
         where: {
           accountId: {
@@ -228,10 +228,10 @@ export class AccountModel extends Model<Partial<AttributesOnly<AccountModel>>> {
       name: 'targetAccountId',
       allowNull: false
     },
-    as: 'BlockedAccounts',
+    as: 'BlockedBy',
     onDelete: 'CASCADE'
   })
-  BlockedAccounts: AccountBlocklistModel[]
+  BlockedBy: AccountBlocklistModel[]
 
   @BeforeDestroy
   static async sendDeleteIfOwned (instance: AccountModel, options) {
@@ -457,6 +457,6 @@ export class AccountModel extends Model<Partial<AttributesOnly<AccountModel>>> {
   }
 
   isBlocked () {
-    return this.BlockedAccounts && this.BlockedAccounts.length !== 0
+    return this.BlockedBy && this.BlockedBy.length !== 0
   }
 }