From 54a74302c67c6168dd1cf5494b8a77d6b20b007a Mon Sep 17 00:00:00 2001 From: Mohammed Abad Date: Tue, 2 Apr 2024 01:16:08 +0000 Subject: [PATCH] add get all lists component --- frontend/src/app/core/services/list.service.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/src/app/core/services/list.service.ts b/frontend/src/app/core/services/list.service.ts index 41467a2..2ff9b74 100644 --- a/frontend/src/app/core/services/list.service.ts +++ b/frontend/src/app/core/services/list.service.ts @@ -11,6 +11,11 @@ export class ListService { private backend_apiUrl = 'http://localhost:4000/api/v1'; constructor(private http: HttpClient) {} + // get all lists + getLists(): Observable { + return this.http.get(`${this.backend_apiUrl}/lists`); + } + // Create a new list createList(list: List): Observable { return this.http.post(`${this.backend_apiUrl}/lists`, list);