Skip to content

Commit

Permalink
refactor: enum 값 영어로 받기
Browse files Browse the repository at this point in the history
  • Loading branch information
yeonjy committed Jul 24, 2024
1 parent cd2a015 commit a52b873
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
8 changes: 0 additions & 8 deletions src/main/java/com/pyro/yolog/domain/diary/entity/Mood.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,4 @@ public enum Mood {
ANGRY("화나는");

private final String name;

@JsonCreator
public static Mood parsing(String inputValue) {
return Stream.of(Mood.values())
.filter(mood -> mood.getName().equals(inputValue))
.findFirst()
.orElseThrow(RequestMoodNameInvalidException::new);
}
}
8 changes: 0 additions & 8 deletions src/main/java/com/pyro/yolog/domain/diary/entity/Weather.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,4 @@ public enum Weather {
WINDS("바람");

private final String name;

@JsonCreator
public static Weather parsing(String inputValue) {
return Stream.of(Weather.values())
.filter(weather -> weather.getName().equals(inputValue))
.findFirst()
.orElseThrow(RequestWeatherNameInvalidException::new);
}
}

0 comments on commit a52b873

Please sign in to comment.