aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/friends
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-14 09:31:41 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-27 19:40:51 +0100
commit1e1265b36c09df1465aa2b4866815c957b6a532e (patch)
tree0ac1b7398c1c941fb653fd27fe037fadae24871d /client/src/app/+admin/friends
parent8e6964874990d5ee9d3703be71c6ab4617b9ce20 (diff)
downloadPeerTube-1e1265b36c09df1465aa2b4866815c957b6a532e.tar.gz
PeerTube-1e1265b36c09df1465aa2b4866815c957b6a532e.tar.zst
PeerTube-1e1265b36c09df1465aa2b4866815c957b6a532e.zip
Make the client compile too
Diffstat (limited to 'client/src/app/+admin/friends')
-rw-r--r--client/src/app/+admin/friends/friend-add/friend-add.component.ts2
-rw-r--r--client/src/app/+admin/friends/friend-list/friend-list.component.ts2
-rw-r--r--client/src/app/+admin/friends/friends.routes.ts2
-rw-r--r--client/src/app/+admin/friends/shared/friend.service.ts8
4 files changed, 7 insertions, 7 deletions
diff --git a/client/src/app/+admin/friends/friend-add/friend-add.component.ts b/client/src/app/+admin/friends/friend-add/friend-add.component.ts
index 6580e1b88..29ed23e0c 100644
--- a/client/src/app/+admin/friends/friend-add/friend-add.component.ts
+++ b/client/src/app/+admin/friends/friend-add/friend-add.component.ts
@@ -91,7 +91,7 @@ export class FriendAddComponent implements OnInit {
91 res => { 91 res => {
92 if (res === false) return 92 if (res === false) return
93 93
94 this.friendService.makeFriends(notEmptyHosts).subscribe( 94 this.friendService.follow(notEmptyHosts).subscribe(
95 status => { 95 status => {
96 this.notificationsService.success('Success', 'Make friends request sent!') 96 this.notificationsService.success('Success', 'Make friends request sent!')
97 // Wait requests between pods 97 // Wait requests between pods
diff --git a/client/src/app/+admin/friends/friend-list/friend-list.component.ts b/client/src/app/+admin/friends/friend-list/friend-list.component.ts
index 5a1ecd280..0323ae96d 100644
--- a/client/src/app/+admin/friends/friend-list/friend-list.component.ts
+++ b/client/src/app/+admin/friends/friend-list/friend-list.component.ts
@@ -74,7 +74,7 @@ export class FriendListComponent extends RestTable implements OnInit {
74 } 74 }
75 75
76 protected loadData () { 76 protected loadData () {
77 this.friendService.getFriends(this.pagination, this.sort) 77 this.friendService.getFollowing(this.pagination, this.sort)
78 .subscribe( 78 .subscribe(
79 resultList => { 79 resultList => {
80 this.friends = resultList.data 80 this.friends = resultList.data
diff --git a/client/src/app/+admin/friends/friends.routes.ts b/client/src/app/+admin/friends/friends.routes.ts
index 61cfcae19..e2cb953b3 100644
--- a/client/src/app/+admin/friends/friends.routes.ts
+++ b/client/src/app/+admin/friends/friends.routes.ts
@@ -12,7 +12,7 @@ export const FriendsRoutes: Routes = [
12 component: FriendsComponent, 12 component: FriendsComponent,
13 canActivate: [ UserRightGuard ], 13 canActivate: [ UserRightGuard ],
14 data: { 14 data: {
15 userRight: UserRight.MANAGE_PODS 15 userRight: UserRight.MANAGE_PEERTUBE_FOLLOW
16 }, 16 },
17 children: [ 17 children: [
18 { 18 {
diff --git a/client/src/app/+admin/friends/shared/friend.service.ts b/client/src/app/+admin/friends/shared/friend.service.ts
index a32cdcc88..083a2fce0 100644
--- a/client/src/app/+admin/friends/shared/friend.service.ts
+++ b/client/src/app/+admin/friends/shared/friend.service.ts
@@ -19,21 +19,21 @@ export class FriendService {
19 private restExtractor: RestExtractor 19 private restExtractor: RestExtractor
20 ) {} 20 ) {}
21 21
22 getFriends (pagination: RestPagination, sort: SortMeta): Observable<ResultList<Pod>> { 22 getFollowing (pagination: RestPagination, sort: SortMeta): Observable<ResultList<Pod>> {
23 let params = new HttpParams() 23 let params = new HttpParams()
24 params = this.restService.addRestGetParams(params, pagination, sort) 24 params = this.restService.addRestGetParams(params, pagination, sort)
25 25
26 return this.authHttp.get<ResultList<Pod>>(FriendService.BASE_FRIEND_URL, { params }) 26 return this.authHttp.get<ResultList<Account>>(API_URL + '/followers', { params })
27 .map(res => this.restExtractor.convertResultListDateToHuman(res)) 27 .map(res => this.restExtractor.convertResultListDateToHuman(res))
28 .catch(res => this.restExtractor.handleError(res)) 28 .catch(res => this.restExtractor.handleError(res))
29 } 29 }
30 30
31 makeFriends (notEmptyHosts: String[]) { 31 follow (notEmptyHosts: String[]) {
32 const body = { 32 const body = {
33 hosts: notEmptyHosts 33 hosts: notEmptyHosts
34 } 34 }
35 35
36 return this.authHttp.post(FriendService.BASE_FRIEND_URL + 'make-friends', body) 36 return this.authHttp.post(API_URL + '/follow', body)
37 .map(this.restExtractor.extractDataBool) 37 .map(this.restExtractor.extractDataBool)
38 .catch(res => this.restExtractor.handleError(res)) 38 .catch(res => this.restExtractor.handleError(res))
39 } 39 }