Skip to content

Commit

Permalink
feat: modify withdraw api
Browse files Browse the repository at this point in the history
  • Loading branch information
Kang1221 committed Aug 27, 2024
1 parent 6fb1242 commit fb637f7
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/main/java/co/orange/ddanzi/service/auth/AuthService.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,6 @@ public ApiResponse<?> verify(VerifyRequestDto requestDto){
public ApiResponse<?> withdraw(){
User user = authUtils.getUser();
user.updateStatus(UserStatus.DELETE);

//item that user sold -> check item in transaction
itemService.deleteItemOfUser(user);

//order that user bought -> check order is not completed
orderService.deleteOrderOfUser(user);

//payment -> check payment is not completed
paymentService.deletePaymentOfUser(user);

//delete user
userRepository.delete(user);

return ApiResponse.onSuccess(Success.DELETE_USER_SUCCESS, Map.of("nickname", user.getNickname()));
}

Expand Down

0 comments on commit fb637f7

Please sign in to comment.