Skip to content

Commit

Permalink
[FIX] 로그아웃 Dto Void로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekks committed Feb 21, 2024
1 parent 476a242 commit 3762849
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/main/java/synk/meeteam/domain/auth/api/AuthApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,5 @@ ResponseEntity<AuthUserResponseDto.login> signUp(
}
)
@Operation(summary = "로그아웃")
ResponseEntity<LogoutUserResponseDto> logout(@AuthUser final User user);
ResponseEntity<Void> logout(@AuthUser final User user);
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,9 @@ public ResponseEntity<ReissueUserResponseDto> reissue(HttpServletRequest request

@Override
@PostMapping("/logout")
public ResponseEntity<LogoutUserResponseDto> logout(@AuthUser final User user) {
return ResponseEntity.ok(jwtService.logout(user));
public ResponseEntity<Void> logout(@AuthUser final User user) {
jwtService.logout(user);
return ResponseEntity.ok().build();
}

@GetMapping("/authTest")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,10 @@ public ReissueUserResponseDto reissueToken(HttpServletRequest request) {
}

@Transactional
public LogoutUserResponseDto logout(User user){
public void logout(User user){
TokenVO foundRefreshToken = redisTokenRepository.findByPlatformIdOrElseThrowException(user.getPlatformId());
foundRefreshToken.updateRefreshToken(null);
redisTokenRepository.save(foundRefreshToken);

return LogoutUserResponseDto.of(user.getPlatformId());
}


Expand Down

0 comments on commit 3762849

Please sign in to comment.