Skip to content

Commit

Permalink
Merge pull request #114 from Genti2024/feat/picture-ratio
Browse files Browse the repository at this point in the history
Fix: #113 PictureRatio 수정(RATIO_3_2 = 세로3,가로2)
  • Loading branch information
LeeJae-H authored Aug 9, 2024
2 parents 122a34c + 9cede3c commit 88b170e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ public List<ExampleWithPictureFindResponseDto> getAllResponseExamples() {

Collections.shuffle(examples);

Optional<ExampleWithPictureFindResponseDto> firstMatchingRatio_3_2 = examples.stream()
.filter(example -> PictureRatio.RATIO_3_2.equals(example.getPicture().getPictureRatio()))
Optional<ExampleWithPictureFindResponseDto> firstMatchingRatio_2_3 = examples.stream()
.filter(example -> PictureRatio.RATIO_2_3.equals(example.getPicture().getPictureRatio()))
.findFirst();

firstMatchingRatio_3_2.ifPresent(matchingExample -> {
firstMatchingRatio_2_3.ifPresent(matchingExample -> {
examples.remove(matchingExample);
examples.add(0, matchingExample);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
@Getter
@RequiredArgsConstructor
public enum PictureRatio implements ConvertableEnum {
RATIO_3_2("RATIO_3_2", "가로3:세로2"),
RATIO_3_2("RATIO_3_2", "세로3:가로2"),
NONE("NONE", "NONE"),
RATIO_2_3("RATIO_2_3", "가로2:세로3");
RATIO_2_3("RATIO_2_3", "세로2:가로3");
private final String stringValue;
private final String response;

Expand Down

0 comments on commit 88b170e

Please sign in to comment.