diff --git a/server/src/main/java/com/yogit/server/applelogin/model/TokenResponse.java b/server/src/main/java/com/yogit/server/applelogin/model/TokenResponse.java index 48ed28f..ab520a1 100644 --- a/server/src/main/java/com/yogit/server/applelogin/model/TokenResponse.java +++ b/server/src/main/java/com/yogit/server/applelogin/model/TokenResponse.java @@ -1,6 +1,7 @@ package com.yogit.server.applelogin.model; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.yogit.server.user.entity.UserStatus; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @@ -22,4 +23,5 @@ public class TokenResponse { private Account account; private Long userId; private String userName; + private UserStatus userStatus; } diff --git a/server/src/main/java/com/yogit/server/applelogin/service/AppleServiceImpl.java b/server/src/main/java/com/yogit/server/applelogin/service/AppleServiceImpl.java index 77b207c..6d3c547 100644 --- a/server/src/main/java/com/yogit/server/applelogin/service/AppleServiceImpl.java +++ b/server/src/main/java/com/yogit/server/applelogin/service/AppleServiceImpl.java @@ -93,6 +93,7 @@ else if (client_secret != null && code == null && refresh_token != null) { tokenResponse.setAccount(new Account(serviceResponse.getState(), code, tokenResponse.getId_token(), user, serviceResponse.getIdentifier(), serviceResponse.getHasRequirementInfo())); tokenResponse.setUserType(UserType.APPLE.toString()); + tokenResponse.setUserStatus(UserStatus.LOGIN); // userId 설정 if(refresh_token == null){ @@ -107,7 +108,6 @@ else if (client_secret != null && code == null && refresh_token != null) { findUser.changeUserStatus(UserStatus.LOGIN); } - return tokenResponse; }