Skip to content

Commit

Permalink
feat: login api에 schoolInfoProvided 필드를 추가한다.
Browse files Browse the repository at this point in the history
  • Loading branch information
rlarltj committed Jul 29, 2024
1 parent 258d3f7 commit 1600009
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1600009

Please sign in to comment.