aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/app/friends
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-06-03 22:08:03 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-06-03 22:08:03 +0200
commit4a6995be18b15de1834a39c8921a0e4109671bb6 (patch)
treeb659661cea33687fcc6bd8fc2251cb7a15ab9f9d /client/app/friends
parent468892541175f9662f8b1b977e819dc1a496f282 (diff)
downloadPeerTube-4a6995be18b15de1834a39c8921a0e4109671bb6.tar.gz
PeerTube-4a6995be18b15de1834a39c8921a0e4109671bb6.tar.zst
PeerTube-4a6995be18b15de1834a39c8921a0e4109671bb6.zip
First draft to use webpack instead of systemjs
Diffstat (limited to 'client/app/friends')
-rw-r--r--client/app/friends/friend.service.ts31
-rw-r--r--client/app/friends/index.ts1
2 files changed, 0 insertions, 32 deletions
diff --git a/client/app/friends/friend.service.ts b/client/app/friends/friend.service.ts
deleted file mode 100644
index d3684f08d..000000000
--- a/client/app/friends/friend.service.ts
+++ /dev/null
@@ -1,31 +0,0 @@
1import { Injectable } from '@angular/core';
2import { Http, Response } from '@angular/http';
3import { Observable } from 'rxjs/Rx';
4
5import { AuthService } from '../shared/index';
6
7@Injectable()
8export class FriendService {
9 private static BASE_FRIEND_URL: string = '/api/v1/pods/';
10
11 constructor (private http: Http, private authService: AuthService) {}
12
13 makeFriends() {
14 const headers = this.authService.getRequestHeader();
15 return this.http.get(FriendService.BASE_FRIEND_URL + 'makefriends', { headers })
16 .map(res => res.status)
17 .catch(this.handleError);
18 }
19
20 quitFriends() {
21 const headers = this.authService.getRequestHeader();
22 return this.http.get(FriendService.BASE_FRIEND_URL + 'quitfriends', { headers })
23 .map(res => res.status)
24 .catch(this.handleError);
25 }
26
27 private handleError (error: Response): Observable<number> {
28 console.error(error);
29 return Observable.throw(error.json().error || 'Server error');
30 }
31}
diff --git a/client/app/friends/index.ts b/client/app/friends/index.ts
deleted file mode 100644
index 0adc256c4..000000000
--- a/client/app/friends/index.ts
+++ /dev/null
@@ -1 +0,0 @@
1export * from './friend.service';