From ccf6ed16f1eeb05b77103bd44bc06ccbbbba9bdd Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 27 May 2016 17:25:52 +0200 Subject: Do not prefix private attributes --- client/app/friends/friend.service.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'client/app/friends') 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'; @Injectable() export class FriendService { - private _baseFriendsUrl = '/api/v1/pods/'; + private static BASE_FRIEND_URL: string = '/api/v1/pods/'; constructor (private http: Http) {} makeFriends() { - return this.http.get(this._baseFriendsUrl + 'makefriends') - .map(res => res.status) + return this.http.get(FriendService.BASE_FRIEND_URL + 'makefriends') + .map(res => res.status) .catch(this.handleError); } quitFriends() { - return this.http.get(this._baseFriendsUrl + 'quitfriends') - .map(res => res.status) + return this.http.get(FriendService.BASE_FRIEND_URL + 'quitfriends') + .map(res => res.status) .catch(this.handleError); } - private handleError (error: Response) { + private handleError (error: Response): Observable { console.error(error); return Observable.throw(error.json().error || 'Server error'); } -- cgit v1.2.3