X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-instance%2Finstance-follow.service.ts;h=a83f7c4ad56cae17ba18c71b5826dbb0fcd29e18;hb=e8bffe9690307f2686ed5573cae2b86ee5f57789;hp=a6799d3e18199ab1e9748f3ca1bc3911ed29fcde;hpb=9df52d660feb722404be00a50f3c8a612bec1c15;p=github%2FChocobozzz%2FPeerTube.git 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))) } }