]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/server/server-blocklist.ts
Merge branch 'release/v1.3.0' into develop
[github/Chocobozzz/PeerTube.git] / server / models / server / server-blocklist.ts
index 705ed2c6b9027704a498ac9f7d373136bc963f42..92c01f642037889061865df597332e9ac95050ce 100644 (file)
@@ -9,11 +9,11 @@ enum ScopeNames {
   WITH_SERVER = 'WITH_SERVER'
 }
 
-@Scopes({
+@Scopes(() => ({
   [ScopeNames.WITH_ACCOUNT]: {
     include: [
       {
-        model: () => AccountModel,
+        model: AccountModel,
         required: true
       }
     ]
@@ -21,12 +21,12 @@ enum ScopeNames {
   [ScopeNames.WITH_SERVER]: {
     include: [
       {
-        model: () => ServerModel,
+        model: ServerModel,
         required: true
       }
     ]
   }
-})
+}))
 
 @Table({
   tableName: 'serverBlocklist',
@@ -72,7 +72,7 @@ export class ServerBlocklistModel extends Model<ServerBlocklistModel> {
     },
     onDelete: 'CASCADE'
   })
-  ServerBlocked: ServerModel
+  BlockedServer: ServerModel
 
   static loadByAccountAndHost (accountId: number, host: string) {
     const query = {
@@ -114,7 +114,7 @@ export class ServerBlocklistModel extends Model<ServerBlocklistModel> {
   toFormattedJSON (): ServerBlock {
     return {
       byAccount: this.ByAccount.toFormattedJSON(),
-      serverBlocked: this.ServerBlocked.toFormattedJSON(),
+      blockedServer: this.BlockedServer.toFormattedJSON(),
       createdAt: this.createdAt
     }
   }