From e8bffe9690307f2686ed5573cae2b86ee5f57789 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 18 Jan 2022 11:37:29 +0100 Subject: Remove unnecessary function --- .../shared-instance/instance-follow.service.ts | 25 +++++----------------- 1 file changed, 5 insertions(+), 20 deletions(-) (limited to 'client/src/app/shared/shared-instance') diff --git a/client/src/app/shared/shared-instance/instance-follow.service.ts b/client/src/app/shared/shared-instance/instance-follow.service.ts index a6799d3e1..a83f7c4ad 100644 --- a/client/src/app/shared/shared-instance/instance-follow.service.ts +++ b/client/src/app/shared/shared-instance/instance-follow.service.ts @@ -71,49 +71,34 @@ export class InstanceFollowService { } return this.authHttp.post(InstanceFollowService.BASE_APPLICATION_URL + '/following', body) - .pipe( - map(this.restExtractor.extractDataBool), - catchError(res => this.restExtractor.handleError(res)) - ) + .pipe(catchError(res => this.restExtractor.handleError(res))) } unfollow (follow: ActorFollow) { const handle = follow.following.name + '@' + follow.following.host return this.authHttp.delete(InstanceFollowService.BASE_APPLICATION_URL + '/following/' + handle) - .pipe( - map(this.restExtractor.extractDataBool), - catchError(res => this.restExtractor.handleError(res)) - ) + .pipe(catchError(res => this.restExtractor.handleError(res))) } acceptFollower (follow: ActorFollow) { const handle = follow.follower.name + '@' + follow.follower.host return this.authHttp.post(`${InstanceFollowService.BASE_APPLICATION_URL}/followers/${handle}/accept`, {}) - .pipe( - map(this.restExtractor.extractDataBool), - catchError(res => this.restExtractor.handleError(res)) - ) + .pipe(catchError(res => this.restExtractor.handleError(res))) } rejectFollower (follow: ActorFollow) { const handle = follow.follower.name + '@' + follow.follower.host return this.authHttp.post(`${InstanceFollowService.BASE_APPLICATION_URL}/followers/${handle}/reject`, {}) - .pipe( - map(this.restExtractor.extractDataBool), - catchError(res => this.restExtractor.handleError(res)) - ) + .pipe(catchError(res => this.restExtractor.handleError(res))) } removeFollower (follow: ActorFollow) { const handle = follow.follower.name + '@' + follow.follower.host return this.authHttp.delete(`${InstanceFollowService.BASE_APPLICATION_URL}/followers/${handle}`) - .pipe( - map(this.restExtractor.extractDataBool), - catchError(res => this.restExtractor.handleError(res)) - ) + .pipe(catchError(res => this.restExtractor.handleError(res))) } } -- cgit v1.2.3