Skip to content

Commit e4dc477

Browse files
committed
CLAP-214 Hotfix : FindStatisticsController 스위치문 수정
<footer> - 관련: #216
1 parent 67fc667 commit e4dc477

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/main/java/clap/server/adapter/inbound/web/statistics/FindStatisticsController.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ public class FindStatisticsController {
3737
@GetMapping
3838
@Secured("ROLE_MANAGER")
3939
public ResponseEntity<List<StatisticsResponse>> aggregateTaskStatistics(@RequestParam PeriodType periodType, @RequestParam StatisticsType statisticsType) {
40-
switch (statisticsType) {
40+
System.out.println("periodType = " + periodType);
41+
System.out.println("statisticsType = " + statisticsType);
42+
return switch (statisticsType) {
4143
case REQUEST_BY_PERIOD ->
4244
ResponseEntity.ok(findTaskProcessUsecase.aggregatePeriodTaskRequest(periodType.getType()));
4345
case PROCESS_BY_PERIOD -> ResponseEntity.ok(findTaskProcessUsecase
@@ -46,8 +48,8 @@ public ResponseEntity<List<StatisticsResponse>> aggregateTaskStatistics(@Request
4648
ResponseEntity.ok(findTaskProcessUsecase.aggregateCategoryTaskRequest(periodType.getType()));
4749
case PROCESS_BY_MANAGER -> ResponseEntity.ok(findTaskProcessUsecase
4850
.aggregateManagerTaskProcess(periodType.getType()));
49-
}
50-
throw new StatisticsException(STATISTICS_BAD_REQUEST);
51+
default -> throw new StatisticsException(STATISTICS_BAD_REQUEST);
52+
};
5153
}
5254

5355
@Operation(summary = "1차 카테고리 하위 2차 카테고리별 통계 API")

0 commit comments

Comments
 (0)