Skip to content

Commit

Permalink
fix(be) - change from PathVariable to RequestParam
Browse files Browse the repository at this point in the history
  • Loading branch information
j1suk1m committed Dec 4, 2024
1 parent 604dadf commit cd29b76
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ public ResponseEntity<FavoriteResponseDto> getUserFavorite(
return ResponseEntity.ok(result);
}

@PostMapping("/favorite/on?location_id={locationId}")
@PostMapping(value = "/favorite/on", params = "location_id")
public ResponseEntity<Void> increaseFavoriteCount(
@AuthUser User user,
@PathVariable Long locationId
@RequestParam(name = "location_id") Long locationId
) {
favoriteService.increaseFavoriteCountAndSave(user, locationId);
return ResponseEntity.ok().build();
}

@DeleteMapping("/favorite/off?location_id={locationId}")
@DeleteMapping(value = "/favorite/off", params = "location_id")
public ResponseEntity<Void> decreaseFavoriteCount(
@AuthUser User user,
@PathVariable Long locationId
@RequestParam(name = "location_id") Long locationId
) {
favoriteService.decreaseFavoriteCountAndDelete(user, locationId);
return ResponseEntity.ok().build();
Expand Down

0 comments on commit cd29b76

Please sign in to comment.