diff options
author | Chocobozzz <me@florianbigard.com> | 2019-04-08 15:47:44 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-04-08 15:47:44 +0200 |
commit | 0dc647775881eb1378b213a530996cd096de24ea (patch) | |
tree | 2b9042cb56ecb876d5c707bdf550fa1303df047c /client/src/app/+admin/follows/shared | |
parent | 14893eb71cb2d4ca47e07589c81958863603aba4 (diff) | |
download | PeerTube-0dc647775881eb1378b213a530996cd096de24ea.tar.gz PeerTube-0dc647775881eb1378b213a530996cd096de24ea.tar.zst PeerTube-0dc647775881eb1378b213a530996cd096de24ea.zip |
Add delete/manual approval instance followers in client
Diffstat (limited to 'client/src/app/+admin/follows/shared')
-rw-r--r-- | client/src/app/+admin/follows/shared/follow.service.ts | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/client/src/app/+admin/follows/shared/follow.service.ts b/client/src/app/+admin/follows/shared/follow.service.ts index a2904179e..c2b8ef006 100644 --- a/client/src/app/+admin/follows/shared/follow.service.ts +++ b/client/src/app/+admin/follows/shared/follow.service.ts | |||
@@ -63,4 +63,34 @@ export class FollowService { | |||
63 | catchError(res => this.restExtractor.handleError(res)) | 63 | catchError(res => this.restExtractor.handleError(res)) |
64 | ) | 64 | ) |
65 | } | 65 | } |
66 | |||
67 | acceptFollower (follow: ActorFollow) { | ||
68 | const handle = follow.follower.name + '@' + follow.follower.host | ||
69 | |||
70 | return this.authHttp.post(`${FollowService.BASE_APPLICATION_URL}/followers/${handle}/accept`, {}) | ||
71 | .pipe( | ||
72 | map(this.restExtractor.extractDataBool), | ||
73 | catchError(res => this.restExtractor.handleError(res)) | ||
74 | ) | ||
75 | } | ||
76 | |||
77 | rejectFollower (follow: ActorFollow) { | ||
78 | const handle = follow.follower.name + '@' + follow.follower.host | ||
79 | |||
80 | return this.authHttp.post(`${FollowService.BASE_APPLICATION_URL}/followers/${handle}/reject`, {}) | ||
81 | .pipe( | ||
82 | map(this.restExtractor.extractDataBool), | ||
83 | catchError(res => this.restExtractor.handleError(res)) | ||
84 | ) | ||
85 | } | ||
86 | |||
87 | removeFollower (follow: ActorFollow) { | ||
88 | const handle = follow.follower.name + '@' + follow.follower.host | ||
89 | |||
90 | return this.authHttp.delete(`${FollowService.BASE_APPLICATION_URL}/followers/${handle}`) | ||
91 | .pipe( | ||
92 | map(this.restExtractor.extractDataBool), | ||
93 | catchError(res => this.restExtractor.handleError(res)) | ||
94 | ) | ||
95 | } | ||
66 | } | 96 | } |