From af5767ffae41b2d5604e41ba9a7225c623dd6735 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 12 Oct 2018 17:26:40 +0200 Subject: Add user/instance block by users in the client --- server/models/account/account-blocklist.ts | 8 ++++---- server/models/server/server-blocklist.ts | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'server/models') diff --git a/server/models/account/account-blocklist.ts b/server/models/account/account-blocklist.ts index bacd122e8..fa2819235 100644 --- a/server/models/account/account-blocklist.ts +++ b/server/models/account/account-blocklist.ts @@ -18,7 +18,7 @@ enum ScopeNames { { model: () => AccountModel, required: true, - as: 'AccountBlocked' + as: 'BlockedAccount' } ] } @@ -67,10 +67,10 @@ export class AccountBlocklistModel extends Model { name: 'targetAccountId', allowNull: false }, - as: 'AccountBlocked', + as: 'BlockedAccount', onDelete: 'CASCADE' }) - AccountBlocked: AccountModel + BlockedAccount: AccountModel static loadByAccountAndTarget (accountId: number, targetAccountId: number) { const query = { @@ -104,7 +104,7 @@ export class AccountBlocklistModel extends Model { toFormattedJSON (): AccountBlock { return { byAccount: this.ByAccount.toFormattedJSON(), - accountBlocked: this.AccountBlocked.toFormattedJSON(), + blockedAccount: this.BlockedAccount.toFormattedJSON(), createdAt: this.createdAt } } diff --git a/server/models/server/server-blocklist.ts b/server/models/server/server-blocklist.ts index 705ed2c6b..450f27152 100644 --- a/server/models/server/server-blocklist.ts +++ b/server/models/server/server-blocklist.ts @@ -72,7 +72,7 @@ export class ServerBlocklistModel extends Model { }, onDelete: 'CASCADE' }) - ServerBlocked: ServerModel + BlockedServer: ServerModel static loadByAccountAndHost (accountId: number, host: string) { const query = { @@ -114,7 +114,7 @@ export class ServerBlocklistModel extends Model { toFormattedJSON (): ServerBlock { return { byAccount: this.ByAccount.toFormattedJSON(), - serverBlocked: this.ServerBlocked.toFormattedJSON(), + blockedServer: this.BlockedServer.toFormattedJSON(), createdAt: this.createdAt } } -- cgit v1.2.3