Skip to content

Commit

Permalink
Fix: #113 PictureRatio 수정(RATIO_3_2 = 세로3,가로2)
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeJae-H committed Aug 9, 2024
1 parent 122a34c commit 9cede3c
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 9cede3c

Please sign in to comment.