aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-instance
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-01-18 11:37:29 +0100
committerChocobozzz <me@florianbigard.com>2022-01-18 11:37:29 +0100
commite8bffe9690307f2686ed5573cae2b86ee5f57789 (patch)
treee6268124e5e9c22eb465d94ad638ed8443bc9743 /client/src/app/shared/shared-instance
parentc1f7a737cfe174ff1648f269a62540826d0e8089 (diff)
downloadPeerTube-e8bffe9690307f2686ed5573cae2b86ee5f57789.tar.gz
PeerTube-e8bffe9690307f2686ed5573cae2b86ee5f57789.tar.zst
PeerTube-e8bffe9690307f2686ed5573cae2b86ee5f57789.zip
Remove unnecessary function
Diffstat (limited to 'client/src/app/shared/shared-instance')
-rw-r--r--client/src/app/shared/shared-instance/instance-follow.service.ts25
1 files changed, 5 insertions, 20 deletions
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 {
71 } 71 }
72 72
73 return this.authHttp.post(InstanceFollowService.BASE_APPLICATION_URL + '/following', body) 73 return this.authHttp.post(InstanceFollowService.BASE_APPLICATION_URL + '/following', body)
74 .pipe( 74 .pipe(catchError(res => this.restExtractor.handleError(res)))
75 map(this.restExtractor.extractDataBool),
76 catchError(res => this.restExtractor.handleError(res))
77 )
78 } 75 }
79 76
80 unfollow (follow: ActorFollow) { 77 unfollow (follow: ActorFollow) {
81 const handle = follow.following.name + '@' + follow.following.host 78 const handle = follow.following.name + '@' + follow.following.host
82 79
83 return this.authHttp.delete(InstanceFollowService.BASE_APPLICATION_URL + '/following/' + handle) 80 return this.authHttp.delete(InstanceFollowService.BASE_APPLICATION_URL + '/following/' + handle)
84 .pipe( 81 .pipe(catchError(res => this.restExtractor.handleError(res)))
85 map(this.restExtractor.extractDataBool),
86 catchError(res => this.restExtractor.handleError(res))
87 )
88 } 82 }
89 83
90 acceptFollower (follow: ActorFollow) { 84 acceptFollower (follow: ActorFollow) {
91 const handle = follow.follower.name + '@' + follow.follower.host 85 const handle = follow.follower.name + '@' + follow.follower.host
92 86
93 return this.authHttp.post(`${InstanceFollowService.BASE_APPLICATION_URL}/followers/${handle}/accept`, {}) 87 return this.authHttp.post(`${InstanceFollowService.BASE_APPLICATION_URL}/followers/${handle}/accept`, {})
94 .pipe( 88 .pipe(catchError(res => this.restExtractor.handleError(res)))
95 map(this.restExtractor.extractDataBool),
96 catchError(res => this.restExtractor.handleError(res))
97 )
98 } 89 }
99 90
100 rejectFollower (follow: ActorFollow) { 91 rejectFollower (follow: ActorFollow) {
101 const handle = follow.follower.name + '@' + follow.follower.host 92 const handle = follow.follower.name + '@' + follow.follower.host
102 93
103 return this.authHttp.post(`${InstanceFollowService.BASE_APPLICATION_URL}/followers/${handle}/reject`, {}) 94 return this.authHttp.post(`${InstanceFollowService.BASE_APPLICATION_URL}/followers/${handle}/reject`, {})
104 .pipe( 95 .pipe(catchError(res => this.restExtractor.handleError(res)))
105 map(this.restExtractor.extractDataBool),
106 catchError(res => this.restExtractor.handleError(res))
107 )
108 } 96 }
109 97
110 removeFollower (follow: ActorFollow) { 98 removeFollower (follow: ActorFollow) {
111 const handle = follow.follower.name + '@' + follow.follower.host 99 const handle = follow.follower.name + '@' + follow.follower.host
112 100
113 return this.authHttp.delete(`${InstanceFollowService.BASE_APPLICATION_URL}/followers/${handle}`) 101 return this.authHttp.delete(`${InstanceFollowService.BASE_APPLICATION_URL}/followers/${handle}`)
114 .pipe( 102 .pipe(catchError(res => this.restExtractor.handleError(res)))
115 map(this.restExtractor.extractDataBool),
116 catchError(res => this.restExtractor.handleError(res))
117 )
118 } 103 }
119} 104}