Skip to content

Commit

Permalink
refactor: 요청 url 변경에 따른 컨트롤러 코드 변경 #8
Browse files Browse the repository at this point in the history
  • Loading branch information
shimbaa committed Sep 18, 2024
1 parent cdb3ff5 commit df21459
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ public ResponseEntity<Void> updateWeightRecord(
return new ResponseEntity<>(HttpStatus.OK);
}

@DeleteMapping("/{id}")
public ResponseEntity<Void> deleteWeightRecord(@PathVariable("id") Long id) {
@DeleteMapping("/{petId}/detail/{id}")
public ResponseEntity<Void> deleteWeightRecord(
@PathVariable("petId") Long petId,
@PathVariable("id") Long id) {

weightService.deleteWeightRecord(id);
weightService.deleteWeightRecord(id, petId);

return new ResponseEntity<>(HttpStatus.OK);
}
Expand Down

0 comments on commit df21459

Please sign in to comment.