remove unnecessary codes
This commit is contained in:
		
							parent
							
								
									95934a733d
								
							
						
					
					
						commit
						7a155b63a2
					
				
					 3 changed files with 3 additions and 23 deletions
				
			
		
							
								
								
									
										15
									
								
								db.json
									
										
									
									
									
								
							
							
						
						
									
										15
									
								
								db.json
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1,16 +1,3 @@
 | 
			
		|||
{
 | 
			
		||||
  "tasks": [
 | 
			
		||||
    {
 | 
			
		||||
      "title": "123",
 | 
			
		||||
      "completed": false,
 | 
			
		||||
      "editing": false,
 | 
			
		||||
      "id": 1
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "title": "2dasd",
 | 
			
		||||
      "completed": false,
 | 
			
		||||
      "editing": false,
 | 
			
		||||
      "id": 2
 | 
			
		||||
    }
 | 
			
		||||
  ]
 | 
			
		||||
  "tasks": []
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -124,7 +124,6 @@ export class TodoList{
 | 
			
		|||
            });
 | 
			
		||||
 | 
			
		||||
            // if(selectedProducts && selectedProducts.length === 1) {
 | 
			
		||||
                
 | 
			
		||||
            // }
 | 
			
		||||
            // else{
 | 
			
		||||
                // this.todoService.deleteAllTask(selectedProducts)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -27,14 +27,8 @@ export class TodoService{
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    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…
	
	Add table
		
		Reference in a new issue