Skip to content

Commit

Permalink
[BE] FIX: AGU user deletedAt set to null
Browse files Browse the repository at this point in the history
  • Loading branch information
enaenen committed Aug 13, 2024
1 parent d3d1718 commit 5b47c8c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void handleUserLogin(HttpServletRequest req, HttpServletResponse res, Str
.orElseGet(() -> userCommandService.createUserByFtProfile(profile));
// 블랙홀이 API에서 가져온 날짜와 다르다면 갱신
if (!user.isSameBlackholedAt(profile.getBlackHoledAt())) {
userCommandService.updateUserBlackholedAtById(user.getId(), profile.getBlackHoledAt());
userCommandService.updateUserBlackholeStatus(user.getId(), profile.getBlackHoledAt());
}
String token = tokenProvider.createUserToken(user, LocalDateTime.now());
Cookie cookie = cookieManager.cookieOf(TokenProvider.USER_TOKEN_NAME, token);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,11 @@ public void updateAlarmStatus(User user, UpdateAlarmRequestDto updateAlarmReques
* @param userId 유저의 ID
* @param blackholedAt 변경할 blackholedAt
*/
public void updateUserBlackholedAtById(Long userId, LocalDateTime blackholedAt) {
public void updateUserBlackholeStatus(Long userId, LocalDateTime blackholedAt) {
User user = userRepository.findById(userId)
.orElseThrow(ExceptionStatus.NOT_FOUND_USER::asServiceException);
user.changeBlackholedAt(blackholedAt);
user.setDeletedAt(null);
userRepository.save(user);
}

Expand Down
2 changes: 1 addition & 1 deletion config

0 comments on commit 5b47c8c

Please sign in to comment.