Skip to content

Commit

Permalink
⚽Refactor #41: 성별 및 연령대변환
Browse files Browse the repository at this point in the history
  • Loading branch information
Juhyeok0202 committed Jul 29, 2023
1 parent fa8f9f1 commit 8d8a44b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/main/java/com/umc/DongnaeFriend/domain/type/Age.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ public String getAge() {
}

public static Age fromString(String strAge) {
if(strAge==""){
return null;
}

for(Age age : Age.values()){
if((age.getAge().charAt(0))==(strAge.charAt(0))){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ public HashMap<String, Object> getUserInfo(String access_Token) throws IOExcepti
String nickname = properties.get("nickname").toString();
String profileImage = properties.get("profile_image").toString();
String email = kakao_account.get("email").toString();
String gender = kakao_account.get("gender").toString();
String age = kakao_account.get("age_range").toString();
String gender = kakao_account.getOrDefault("gender","").toString();
String age = kakao_account.getOrDefault("age_range","").toString();

userInfo.put("id", id);
userInfo.put("nickname", nickname);
Expand Down

0 comments on commit 8d8a44b

Please sign in to comment.