]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+admin/friends/shared/friend.service.ts
Make the client compile too
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / friends / shared / friend.service.ts
index a32cdcc88410a4d764efc2d173e62529f1043009..083a2fce0408091e8769bc69d609fa4fc145323f 100644 (file)
@@ -19,21 +19,21 @@ export class FriendService {
     private restExtractor: RestExtractor
   ) {}
 
-  getFriends (pagination: RestPagination, sort: SortMeta): Observable<ResultList<Pod>> {
+  getFollowing (pagination: RestPagination, sort: SortMeta): Observable<ResultList<Pod>> {
     let params = new HttpParams()
     params = this.restService.addRestGetParams(params, pagination, sort)
 
-    return this.authHttp.get<ResultList<Pod>>(FriendService.BASE_FRIEND_URL, { params })
+    return this.authHttp.get<ResultList<Account>>(API_URL + '/followers', { params })
                         .map(res => this.restExtractor.convertResultListDateToHuman(res))
                         .catch(res => this.restExtractor.handleError(res))
   }
 
-  makeFriends (notEmptyHosts: String[]) {
+  follow (notEmptyHosts: String[]) {
     const body = {
       hosts: notEmptyHosts
     }
 
-    return this.authHttp.post(FriendService.BASE_FRIEND_URL + 'make-friends', body)
+    return this.authHttp.post(API_URL + '/follow', body)
                         .map(this.restExtractor.extractDataBool)
                         .catch(res => this.restExtractor.handleError(res))
   }