From 1600009e093f2cffd166106bd8e067f5ae637643 Mon Sep 17 00:00:00 2001 From: rlarltj123 Date: Mon, 29 Jul 2024 23:59:51 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20login=20api=EC=97=90=20schoolInfoProvid?= =?UTF-8?q?ed=20=ED=95=84=EB=93=9C=EB=A5=BC=20=EC=B6=94=EA=B0=80=ED=95=9C?= =?UTF-8?q?=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/response/LoginSuccessResponse.java | 20 +++++++++++++------ .../user/service/UserFacadeService.java | 8 +++++++- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/moneymong/domain/user/api/response/LoginSuccessResponse.java b/src/main/java/com/moneymong/domain/user/api/response/LoginSuccessResponse.java index d7912a1..235661a 100644 --- a/src/main/java/com/moneymong/domain/user/api/response/LoginSuccessResponse.java +++ b/src/main/java/com/moneymong/domain/user/api/response/LoginSuccessResponse.java @@ -12,13 +12,21 @@ public class LoginSuccessResponse { private String refreshToken; private boolean loginSuccess; private boolean schoolInfoExist; + private boolean schoolInfoProvided; - public static LoginSuccessResponse of(String accessToken, String refreshToken, boolean loginSuccess, boolean schoolInfoExist) { + public static LoginSuccessResponse of( + String accessToken, + String refreshToken, + boolean loginSuccess, + boolean schoolInfoExist, + boolean schoolInfoProvided + ) { return LoginSuccessResponse.builder() - .accessToken(accessToken) - .refreshToken(refreshToken) - .loginSuccess(loginSuccess) - .schoolInfoExist(schoolInfoExist) - .build(); + .accessToken(accessToken) + .refreshToken(refreshToken) + .loginSuccess(loginSuccess) + .schoolInfoExist(schoolInfoExist) + .schoolInfoProvided(schoolInfoProvided) + .build(); } } diff --git a/src/main/java/com/moneymong/domain/user/service/UserFacadeService.java b/src/main/java/com/moneymong/domain/user/service/UserFacadeService.java index 885d6f7..5f90da9 100644 --- a/src/main/java/com/moneymong/domain/user/service/UserFacadeService.java +++ b/src/main/java/com/moneymong/domain/user/service/UserFacadeService.java @@ -34,7 +34,13 @@ public LoginSuccessResponse login(LoginRequest loginRequest) { boolean loginSuccess = true; boolean schoolInfoExists = userUniversityService.exists(registerResult.getUserId()); - return LoginSuccessResponse.of(tokens.getAccessToken(), tokens.getRefreshToken(), loginSuccess, schoolInfoExists); + return LoginSuccessResponse.of( + tokens.getAccessToken(), + tokens.getRefreshToken(), + loginSuccess, + schoolInfoExists, + schoolInfoExists // schoolInfoExists와 동일한 값을 반환하며, 추후 schoolInfoExists 필드를 삭제한다. + ); } @Transactional