diff --git a/src/main/java/com/bbteam/budgetbuddies/domain/consumptiongoal/controller/ConsumptionGoalController.java b/src/main/java/com/bbteam/budgetbuddies/domain/consumptiongoal/controller/ConsumptionGoalController.java index 0233a4c6..d14dce3e 100644 --- a/src/main/java/com/bbteam/budgetbuddies/domain/consumptiongoal/controller/ConsumptionGoalController.java +++ b/src/main/java/com/bbteam/budgetbuddies/domain/consumptiongoal/controller/ConsumptionGoalController.java @@ -27,13 +27,13 @@ @RestController @RequiredArgsConstructor -@RequestMapping("/consumption-goal") +@RequestMapping("/consumption-goals") public class ConsumptionGoalController implements ConsumptionGoalApi { private final ConsumptionGoalService consumptionGoalService; @Override - @GetMapping("/top-categories/top-goal/4") + @GetMapping("/categories/top-goals/top-4") public ApiResponse> getTopConsumptionGoalCategories( @RequestParam(name = "userId") Long userId, @RequestParam(name = "peerAgeStart", defaultValue = "0") int peerAgeStart, @@ -44,7 +44,7 @@ public ApiResponse> getTopConsumptionGoalCatego return ApiResponse.onSuccess(response); } - @GetMapping("/top-categories/top-goal") + @GetMapping("/categories/top-goals") public ApiResponse> getAllConsumptionGoalCategories( @RequestParam(name = "userId") Long userId, @RequestParam(name = "peerAgeStart", defaultValue = "0") int peerAgeStart, @@ -84,7 +84,7 @@ public ResponseEntity updateOrElseGenerateConsum .body(consumptionGoalService.updateConsumptionGoals(userId, consumptionGoalListRequestDto)); } - @GetMapping("/top-categories/top-consumption/3") + @GetMapping("/categories/top-consumptions/top-3") public ApiResponse> getTopConsumptionCategories( @RequestParam(name = "userId") Long userId, @RequestParam(name = "peerAgeStart", defaultValue = "0") int peerAgeStart, @@ -95,7 +95,7 @@ public ApiResponse> getTopConsumptionCategories( return ApiResponse.onSuccess(response); } - @GetMapping("/top-categories/top-consumption") + @GetMapping("/categories/top-consumptions") public ApiResponse> getAllConsumptionCategories( @RequestParam(name = "userId") Long userId, @RequestParam(name = "peerAgeStart", defaultValue = "0") int peerAgeStart, @@ -106,8 +106,9 @@ public ApiResponse> getAllConsumptionCat return ApiResponse.onSuccess(response); } - @GetMapping("/top-categories/top-consumption/{userId}") - public ApiResponse getTopCategoryAndConsumptionAmount(@PathVariable Long userId) { + @GetMapping("/category/top-goals") + public ApiResponse getTopCategoryAndConsumptionAmount( + @RequestParam(name = "userId") Long userId) { ConsumptionAnalysisResponseDto response = consumptionGoalService.getTopCategoryAndConsumptionAmount(userId); return ApiResponse.onSuccess(response); }