aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/app/friends
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-05-27 17:25:52 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-05-27 17:25:52 +0200
commitccf6ed16f1eeb05b77103bd44bc06ccbbbba9bdd (patch)
tree1765f48824be934e0be07e8a987a9513c58ba3da /client/app/friends
parent41a2aee38cf812510010da09de9bae53590ec119 (diff)
downloadPeerTube-ccf6ed16f1eeb05b77103bd44bc06ccbbbba9bdd.tar.gz
PeerTube-ccf6ed16f1eeb05b77103bd44bc06ccbbbba9bdd.tar.zst
PeerTube-ccf6ed16f1eeb05b77103bd44bc06ccbbbba9bdd.zip
Do not prefix private attributes
Diffstat (limited to 'client/app/friends')
-rw-r--r--client/app/friends/friend.service.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/client/app/friends/friend.service.ts b/client/app/friends/friend.service.ts
index d143ec40d..bdfa7baec 100644
--- a/client/app/friends/friend.service.ts
+++ b/client/app/friends/friend.service.ts
@@ -4,23 +4,23 @@ import { Observable } from 'rxjs/Rx';
4 4
5@Injectable() 5@Injectable()
6export class FriendService { 6export class FriendService {
7 private _baseFriendsUrl = '/api/v1/pods/'; 7 private static BASE_FRIEND_URL: string = '/api/v1/pods/';
8 8
9 constructor (private http: Http) {} 9 constructor (private http: Http) {}
10 10
11 makeFriends() { 11 makeFriends() {
12 return this.http.get(this._baseFriendsUrl + 'makefriends') 12 return this.http.get(FriendService.BASE_FRIEND_URL + 'makefriends')
13 .map(res => <number> res.status) 13 .map(res => res.status)
14 .catch(this.handleError); 14 .catch(this.handleError);
15 } 15 }
16 16
17 quitFriends() { 17 quitFriends() {
18 return this.http.get(this._baseFriendsUrl + 'quitfriends') 18 return this.http.get(FriendService.BASE_FRIEND_URL + 'quitfriends')
19 .map(res => <number> res.status) 19 .map(res => res.status)
20 .catch(this.handleError); 20 .catch(this.handleError);
21 } 21 }
22 22
23 private handleError (error: Response) { 23 private handleError (error: Response): Observable<number> {
24 console.error(error); 24 console.error(error);
25 return Observable.throw(error.json().error || 'Server error'); 25 return Observable.throw(error.json().error || 'Server error');
26 } 26 }