add getList by id
This commit is contained in:
1 parent
90cfe21f05
commit
5e6be9892b
1 file changed
+6
-1
@@ -17,6 +17,11 @@ export class ListService {
|
||||
return this.http.get<List[]>(`${this.backend_apiUrl}/lists`);
|
||||
}
|
||||
|
||||
// get a list by id
|
||||
getList(id: string) {
|
||||
return this.http.get<List[]>(`${this.backend_apiUrl}/lists/${id}`);
|
||||
}
|
||||
|
||||
// Create a new list
|
||||
createList(list: List): Observable<List> {
|
||||
return this.http.post<List>(`${this.backend_apiUrl}/lists`, list);
|
||||
@@ -52,7 +57,7 @@ export class ListService {
|
||||
}
|
||||
|
||||
// Remove an entry from a list
|
||||
removeEntryFromList(listId: number, entryId: number): Observable<Entry> {
|
||||
removeEntryFromList(listId: string, entryId: number): Observable<Entry> {
|
||||
return this.http.delete<Entry>(
|
||||
`${this.backend_apiUrl}/lists/${listId}/entries/${entryId}`
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user