diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-20 11:19:23 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:40:52 +0100 |
commit | 7e9334c34db23e5ad1e118151b24c720dd985984 (patch) | |
tree | 154f5d1db44ff652b793d8e0b7dc1b00a3ddaec1 /client/src/app/+admin/follows/shared | |
parent | 892211e8493b1f992fce7616cb1e48b7ff87a1dc (diff) | |
download | PeerTube-7e9334c34db23e5ad1e118151b24c720dd985984.tar.gz PeerTube-7e9334c34db23e5ad1e118151b24c720dd985984.tar.zst PeerTube-7e9334c34db23e5ad1e118151b24c720dd985984.zip |
Add ability to unfollow a server
Diffstat (limited to 'client/src/app/+admin/follows/shared')
-rw-r--r-- | client/src/app/+admin/follows/shared/follow.service.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/client/src/app/+admin/follows/shared/follow.service.ts b/client/src/app/+admin/follows/shared/follow.service.ts index f66ed477d..0bfbe8eb6 100644 --- a/client/src/app/+admin/follows/shared/follow.service.ts +++ b/client/src/app/+admin/follows/shared/follow.service.ts | |||
@@ -37,7 +37,7 @@ export class FollowService { | |||
37 | .catch(res => this.restExtractor.handleError(res)) | 37 | .catch(res => this.restExtractor.handleError(res)) |
38 | } | 38 | } |
39 | 39 | ||
40 | follow (notEmptyHosts: String[]) { | 40 | follow (notEmptyHosts: string[]) { |
41 | const body = { | 41 | const body = { |
42 | hosts: notEmptyHosts | 42 | hosts: notEmptyHosts |
43 | } | 43 | } |
@@ -46,4 +46,10 @@ export class FollowService { | |||
46 | .map(this.restExtractor.extractDataBool) | 46 | .map(this.restExtractor.extractDataBool) |
47 | .catch(res => this.restExtractor.handleError(res)) | 47 | .catch(res => this.restExtractor.handleError(res)) |
48 | } | 48 | } |
49 | |||
50 | unfollow (follow: AccountFollow) { | ||
51 | return this.authHttp.delete(FollowService.BASE_APPLICATION_URL + '/following/' + follow.following.id) | ||
52 | .map(this.restExtractor.extractDataBool) | ||
53 | .catch(res => this.restExtractor.handleError(res)) | ||
54 | } | ||
49 | } | 55 | } |