work on watcher list
This commit is contained in:
28
src/app/_services/watcher.service.ts
Normal file
28
src/app/_services/watcher.service.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import 'rxjs/add/operator/map'
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class WatcherService {
|
||||
|
||||
private apiUrl = "api/watching/";
|
||||
|
||||
constructor(
|
||||
private http: HttpClient
|
||||
|
||||
) { }
|
||||
|
||||
|
||||
getWatching() {
|
||||
const url = this.apiUrl
|
||||
return this.http.get<any>(url)
|
||||
.map(data => {
|
||||
return data;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user