@@ -40,10 +40,16 @@ export class TrackController {
 | 
				
			|||||||
  @Put(":id")
 | 
					  @Put(":id")
 | 
				
			||||||
  put(@Param("id") id: number, @Body() user: any) {
 | 
					  put(@Param("id") id: number, @Body() user: any) {
 | 
				
			||||||
    return "Updating a user...";
 | 
					    return "Updating a user...";
 | 
				
			||||||
 | 
					  @Put("/:id")
 | 
				
			||||||
 | 
					  put(@Param("id") id: number, @EntityFromBody() track: Track) {
 | 
				
			||||||
 | 
					    return this.trackRepository.update({id: id}, track);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @Delete(":id")
 | 
					  @Delete(":id")
 | 
				
			||||||
  remove(@EntityFromParam("id") track: Track) {
 | 
					  remove(@EntityFromParam("id") track: Track) {
 | 
				
			||||||
    return this.trackRepository.delete(track);
 | 
					    return this.trackRepository.delete(track);
 | 
				
			||||||
 | 
					  @Delete("/:id")
 | 
				
			||||||
 | 
					  remove(@Param('id') id: number) {
 | 
				
			||||||
 | 
					    return this.trackRepository.delete({id: id});
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user