-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[Fix] #261 - O-KR 히스토리 조회 API 변경사항 반영
- Loading branch information
Showing
2 changed files
with
3 additions
and
17 deletions.
There are no files selected for viewing
12 changes: 2 additions & 10 deletions
12
moonshot-api/src/main/java/org/moonshot/objective/dto/response/HistoryResponseDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,12 @@ | ||
package org.moonshot.objective.dto.response; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
import org.moonshot.objective.model.Criteria; | ||
|
||
public record HistoryResponseDto( | ||
List<ObjectiveGroupByYearDto> groups, | ||
List<YearDto> years, | ||
List<String> categories | ||
) { | ||
public static HistoryResponseDto of(List<ObjectiveGroupByYearDto> groups, Map<Integer, Integer> years, | ||
List<String> categories, Criteria criteria) { | ||
return new HistoryResponseDto( | ||
groups, | ||
YearDto.of(years), | ||
categories.stream().distinct().toList() | ||
); | ||
public static HistoryResponseDto of(List<ObjectiveGroupByYearDto> groups, List<String> categories) { | ||
return new HistoryResponseDto(groups, categories.stream().distinct().toList()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters