diff options
author | Chocobozzz <me@florianbigard.com> | 2018-10-12 17:26:40 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-10-16 16:41:36 +0200 |
commit | af5767ffae41b2d5604e41ba9a7225c623dd6735 (patch) | |
tree | b96787bd134fe04d3d042795636df4bf17b5991f /server/models/account | |
parent | 7ad9b9846c44d198a736183fb186c2039f5236b5 (diff) | |
download | PeerTube-af5767ffae41b2d5604e41ba9a7225c623dd6735.tar.gz PeerTube-af5767ffae41b2d5604e41ba9a7225c623dd6735.tar.zst PeerTube-af5767ffae41b2d5604e41ba9a7225c623dd6735.zip |
Add user/instance block by users in the client
Diffstat (limited to 'server/models/account')
-rw-r--r-- | server/models/account/account-blocklist.ts | 8 |
1 files changed, 4 insertions, 4 deletions
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 { | |||
18 | { | 18 | { |
19 | model: () => AccountModel, | 19 | model: () => AccountModel, |
20 | required: true, | 20 | required: true, |
21 | as: 'AccountBlocked' | 21 | as: 'BlockedAccount' |
22 | } | 22 | } |
23 | ] | 23 | ] |
24 | } | 24 | } |
@@ -67,10 +67,10 @@ export class AccountBlocklistModel extends Model<AccountBlocklistModel> { | |||
67 | name: 'targetAccountId', | 67 | name: 'targetAccountId', |
68 | allowNull: false | 68 | allowNull: false |
69 | }, | 69 | }, |
70 | as: 'AccountBlocked', | 70 | as: 'BlockedAccount', |
71 | onDelete: 'CASCADE' | 71 | onDelete: 'CASCADE' |
72 | }) | 72 | }) |
73 | AccountBlocked: AccountModel | 73 | BlockedAccount: AccountModel |
74 | 74 | ||
75 | static loadByAccountAndTarget (accountId: number, targetAccountId: number) { | 75 | static loadByAccountAndTarget (accountId: number, targetAccountId: number) { |
76 | const query = { | 76 | const query = { |
@@ -104,7 +104,7 @@ export class AccountBlocklistModel extends Model<AccountBlocklistModel> { | |||
104 | toFormattedJSON (): AccountBlock { | 104 | toFormattedJSON (): AccountBlock { |
105 | return { | 105 | return { |
106 | byAccount: this.ByAccount.toFormattedJSON(), | 106 | byAccount: this.ByAccount.toFormattedJSON(), |
107 | accountBlocked: this.AccountBlocked.toFormattedJSON(), | 107 | blockedAccount: this.BlockedAccount.toFormattedJSON(), |
108 | createdAt: this.createdAt | 108 | createdAt: this.createdAt |
109 | } | 109 | } |
110 | } | 110 | } |