remove unnecessary codes
This commit is contained in:
parent
95934a733d
commit
7a155b63a2
15
db.json
15
db.json
|
@ -1,16 +1,3 @@
|
||||||
{
|
{
|
||||||
"tasks": [
|
"tasks": []
|
||||||
{
|
|
||||||
"title": "123",
|
|
||||||
"completed": false,
|
|
||||||
"editing": false,
|
|
||||||
"id": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "2dasd",
|
|
||||||
"completed": false,
|
|
||||||
"editing": false,
|
|
||||||
"id": 2
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
|
@ -124,7 +124,6 @@ export class TodoList{
|
||||||
});
|
});
|
||||||
|
|
||||||
// if(selectedProducts && selectedProducts.length === 1) {
|
// if(selectedProducts && selectedProducts.length === 1) {
|
||||||
|
|
||||||
// }
|
// }
|
||||||
// else{
|
// else{
|
||||||
// this.todoService.deleteAllTask(selectedProducts)
|
// this.todoService.deleteAllTask(selectedProducts)
|
||||||
|
|
|
@ -27,14 +27,8 @@ export class TodoService{
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteTask(id:number){
|
deleteTask(id:number){
|
||||||
return this.http.delete(URL + '/' + id);
|
return this.http.delete(URL + '/' + id)
|
||||||
|
.pipe(map((res:any) => res));
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteCompletedTask(id: number[]){
|
|
||||||
return this.http.delete<number[]>(URL + '/' + id)
|
|
||||||
.pipe(map((res:any) => res.json()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue