add get all lists component
This commit is contained in:
1 parent
4a5d2e1dda
commit
54a74302c6
1 file changed
+5
@@ -11,6 +11,11 @@ export class ListService {
|
|||||||
private backend_apiUrl = 'http://localhost:4000/api/v1';
|
private backend_apiUrl = 'http://localhost:4000/api/v1';
|
||||||
constructor(private http: HttpClient) {}
|
constructor(private http: HttpClient) {}
|
||||||
|
|
||||||
|
// get all lists
|
||||||
|
getLists(): Observable<List[]> {
|
||||||
|
return this.http.get<List[]>(`${this.backend_apiUrl}/lists`);
|
||||||
|
}
|
||||||
|
|
||||||
// Create a new list
|
// Create a new list
|
||||||
createList(list: List): Observable<List> {
|
createList(list: List): Observable<List> {
|
||||||
return this.http.post<List>(`${this.backend_apiUrl}/lists`, list);
|
return this.http.post<List>(`${this.backend_apiUrl}/lists`, list);
|
||||||
|
|||||||
Reference in new issue
Block a user