Skip to content

Commit

Permalink
FIX : 로그아웃 API 내 토큰 해제 로직 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
yummygyudon committed Nov 12, 2023
1 parent 92ade72 commit 6425716
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ public ResponseEntity<PushTokenResponse.StatusResponse> logout(
@AuthenticationPrincipal User user,
@Valid @RequestBody PushTokenRequest.DeleteRequest deleteRequest
) {
PushToken targetPushToken = pushTokenService.getDeviceToken(
user.getId(), deleteRequest.getPushToken()
);
// val result =
pushTokenService.deleteDeviceToken(targetPushToken);
// val response = pushTokenResponseMapper.ofStatus(result);
if (pushTokenService.isExistDeviceToken(user.getId(), deleteRequest.getPushToken())) {
PushToken targetPushToken = pushTokenService.getDeviceToken(
user.getId(), deleteRequest.getPushToken()
);
pushTokenService.deleteDeviceToken(targetPushToken);
}
return ResponseEntity.status(HttpStatus.OK).body(null);
}

Expand Down

0 comments on commit 6425716

Please sign in to comment.