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