diff options
Diffstat (limited to 'client/angular/videos/services')
-rw-r--r-- | client/angular/videos/services/videos.service.ts | 6 |
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'); |