aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-moderation
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-06-28 16:38:51 +0200
committerRigel Kent <sendmemail@rigelk.eu>2020-06-28 16:55:17 +0200
commitd473fd94ce2fd04bffc6cf6ee8f193db309c1d83 (patch)
tree4fb2570730d6ddfa52514e874c0ecb79ee8e944b /client/src/app/shared/shared-moderation
parent4c9e9d2ee9899ba48b86eda18d44638a78587ac5 (diff)
downloadPeerTube-d473fd94ce2fd04bffc6cf6ee8f193db309c1d83.tar.gz
PeerTube-d473fd94ce2fd04bffc6cf6ee8f193db309c1d83.tar.zst
PeerTube-d473fd94ce2fd04bffc6cf6ee8f193db309c1d83.zip
allow muting from the miniature options
initial implementation with a listing refresh except on search results
Diffstat (limited to 'client/src/app/shared/shared-moderation')
-rw-r--r--client/src/app/shared/shared-moderation/blocklist.service.ts8
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)