diff options
Diffstat (limited to 'client/src/app/shared/shared-moderation/blocklist.service.ts')
-rw-r--r-- | client/src/app/shared/shared-moderation/blocklist.service.ts | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/client/src/app/shared/shared-moderation/blocklist.service.ts b/client/src/app/shared/shared-moderation/blocklist.service.ts index 1169bf757..0fb7536e5 100644 --- a/client/src/app/shared/shared-moderation/blocklist.service.ts +++ b/client/src/app/shared/shared-moderation/blocklist.service.ts | |||
@@ -53,7 +53,6 @@ export class BlocklistService { | |||
53 | 53 | ||
54 | return this.authHttp.get<ResultList<AccountBlock>>(BlocklistService.BASE_USER_BLOCKLIST_URL + '/accounts', { params }) | 54 | return this.authHttp.get<ResultList<AccountBlock>>(BlocklistService.BASE_USER_BLOCKLIST_URL + '/accounts', { params }) |
55 | .pipe( | 55 | .pipe( |
56 | map(res => this.restExtractor.convertResultListDateToHuman(res)), | ||
57 | map(res => this.restExtractor.applyToResultListData(res, this.formatAccountBlock.bind(this))), | 56 | map(res => this.restExtractor.applyToResultListData(res, this.formatAccountBlock.bind(this))), |
58 | catchError(err => this.restExtractor.handleError(err)) | 57 | catchError(err => this.restExtractor.handleError(err)) |
59 | ) | 58 | ) |
@@ -84,10 +83,7 @@ export class BlocklistService { | |||
84 | if (search) params = params.append('search', search) | 83 | if (search) params = params.append('search', search) |
85 | 84 | ||
86 | return this.authHttp.get<ResultList<ServerBlock>>(BlocklistService.BASE_USER_BLOCKLIST_URL + '/servers', { params }) | 85 | return this.authHttp.get<ResultList<ServerBlock>>(BlocklistService.BASE_USER_BLOCKLIST_URL + '/servers', { params }) |
87 | .pipe( | 86 | .pipe(catchError(err => this.restExtractor.handleError(err))) |
88 | map(res => this.restExtractor.convertResultListDateToHuman(res)), | ||
89 | catchError(err => this.restExtractor.handleError(err)) | ||
90 | ) | ||
91 | } | 87 | } |
92 | 88 | ||
93 | blockServerByUser (host: string) { | 89 | blockServerByUser (host: string) { |
@@ -116,7 +112,6 @@ export class BlocklistService { | |||
116 | 112 | ||
117 | return this.authHttp.get<ResultList<AccountBlock>>(BlocklistService.BASE_SERVER_BLOCKLIST_URL + '/accounts', { params }) | 113 | return this.authHttp.get<ResultList<AccountBlock>>(BlocklistService.BASE_SERVER_BLOCKLIST_URL + '/accounts', { params }) |
118 | .pipe( | 114 | .pipe( |
119 | map(res => this.restExtractor.convertResultListDateToHuman(res)), | ||
120 | map(res => this.restExtractor.applyToResultListData(res, this.formatAccountBlock.bind(this))), | 115 | map(res => this.restExtractor.applyToResultListData(res, this.formatAccountBlock.bind(this))), |
121 | catchError(err => this.restExtractor.handleError(err)) | 116 | catchError(err => this.restExtractor.handleError(err)) |
122 | ) | 117 | ) |
@@ -151,10 +146,7 @@ export class BlocklistService { | |||
151 | if (search) params = params.append('search', search) | 146 | if (search) params = params.append('search', search) |
152 | 147 | ||
153 | return this.authHttp.get<ResultList<ServerBlock>>(BlocklistService.BASE_SERVER_BLOCKLIST_URL + '/servers', { params }) | 148 | return this.authHttp.get<ResultList<ServerBlock>>(BlocklistService.BASE_SERVER_BLOCKLIST_URL + '/servers', { params }) |
154 | .pipe( | 149 | .pipe(catchError(err => this.restExtractor.handleError(err))) |
155 | map(res => this.restExtractor.convertResultListDateToHuman(res)), | ||
156 | catchError(err => this.restExtractor.handleError(err)) | ||
157 | ) | ||
158 | } | 150 | } |
159 | 151 | ||
160 | blockServerByInstance (host: string) { | 152 | blockServerByInstance (host: string) { |