aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/angular/videos/services
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-03-14 22:16:43 +0100
committerChocobozzz <florian.bigard@gmail.com>2016-03-14 22:16:43 +0100
commit98b01bac2c2c4536aa97d826b61516657f4d15f5 (patch)
tree75fe2d75f1c58c6897127f03cfb7d8b654545227 /client/angular/videos/services
parentdc8bc31be517a53e8fbe7100cfe45cd73f596de0 (diff)
downloadPeerTube-98b01bac2c2c4536aa97d826b61516657f4d15f5.tar.gz
PeerTube-98b01bac2c2c4536aa97d826b61516657f4d15f5.tar.zst
PeerTube-98b01bac2c2c4536aa97d826b61516657f4d15f5.zip
Angular 2 : draft 2
Diffstat (limited to 'client/angular/videos/services')
-rw-r--r--client/angular/videos/services/videos.service.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/client/angular/videos/services/videos.service.ts b/client/angular/videos/services/videos.service.ts
index 784eec68d..17ae89c8b 100644
--- a/client/angular/videos/services/videos.service.ts
+++ b/client/angular/videos/services/videos.service.ts
@@ -30,6 +30,12 @@ export class VideosService {
30 } 30 }
31 } 31 }
32 32
33 searchVideos(search: string) {
34 return this.http.get(this._baseVideoUrl + 'search/' + search)
35 .map(res => <Video> res.json())
36 .catch(this.handleError);
37 }
38
33 private handleError (error: Response) { 39 private handleError (error: Response) {
34 console.error(error); 40 console.error(error);
35 return Observable.throw(error.json().error || 'Server error'); 41 return Observable.throw(error.json().error || 'Server error');