diff options
Diffstat (limited to 'client/src/app/shared/shared-moderation')
-rw-r--r-- | client/src/app/shared/shared-moderation/blocklist.service.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/client/src/app/shared/shared-moderation/blocklist.service.ts b/client/src/app/shared/shared-moderation/blocklist.service.ts index 0caa92782..de677a77b 100644 --- a/client/src/app/shared/shared-moderation/blocklist.service.ts +++ b/client/src/app/shared/shared-moderation/blocklist.service.ts | |||
@@ -39,14 +39,14 @@ export class BlocklistService { | |||
39 | ) | 39 | ) |
40 | } | 40 | } |
41 | 41 | ||
42 | blockAccountByUser (account: Account) { | 42 | blockAccountByUser (account: Pick<Account, 'nameWithHost'>) { |
43 | const body = { accountName: account.nameWithHost } | 43 | const body = { accountName: account.nameWithHost } |
44 | 44 | ||
45 | return this.authHttp.post(BlocklistService.BASE_USER_BLOCKLIST_URL + '/accounts', body) | 45 | return this.authHttp.post(BlocklistService.BASE_USER_BLOCKLIST_URL + '/accounts', body) |
46 | .pipe(catchError(err => this.restExtractor.handleError(err))) | 46 | .pipe(catchError(err => this.restExtractor.handleError(err))) |
47 | } | 47 | } |
48 | 48 | ||
49 | unblockAccountByUser (account: Account) { | 49 | unblockAccountByUser (account: Pick<Account, 'nameWithHost'>) { |
50 | const path = BlocklistService.BASE_USER_BLOCKLIST_URL + '/accounts/' + account.nameWithHost | 50 | const path = BlocklistService.BASE_USER_BLOCKLIST_URL + '/accounts/' + account.nameWithHost |
51 | 51 | ||
52 | return this.authHttp.delete(path) | 52 | return this.authHttp.delete(path) |
@@ -102,14 +102,14 @@ export class BlocklistService { | |||
102 | ) | 102 | ) |
103 | } | 103 | } |
104 | 104 | ||
105 | blockAccountByInstance (account: Account) { | 105 | blockAccountByInstance (account: Pick<Account, 'nameWithHost'>) { |
106 | const body = { accountName: account.nameWithHost } | 106 | const body = { accountName: account.nameWithHost } |
107 | 107 | ||
108 | return this.authHttp.post(BlocklistService.BASE_SERVER_BLOCKLIST_URL + '/accounts', body) | 108 | return this.authHttp.post(BlocklistService.BASE_SERVER_BLOCKLIST_URL + '/accounts', body) |
109 | .pipe(catchError(err => this.restExtractor.handleError(err))) | 109 | .pipe(catchError(err => this.restExtractor.handleError(err))) |
110 | } | 110 | } |
111 | 111 | ||
112 | unblockAccountByInstance (account: Account) { | 112 | unblockAccountByInstance (account: Pick<Account, 'nameWithHost'>) { |
113 | const path = BlocklistService.BASE_SERVER_BLOCKLIST_URL + '/accounts/' + account.nameWithHost | 113 | const path = BlocklistService.BASE_SERVER_BLOCKLIST_URL + '/accounts/' + account.nameWithHost |
114 | 114 | ||
115 | return this.authHttp.delete(path) | 115 | return this.authHttp.delete(path) |