Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NB-241] 회원탈퇴 후 로그인 시 예외 처리 구현 #62

Merged
merged 2 commits into from
Oct 18, 2024

Conversation

Aram-su
Copy link
Contributor

@Aram-su Aram-su commented Oct 17, 2024

개요

NB-241

  • 삭제된 계정 조회 기능 구현
  • 삭제된 계정 확인 시 예외 발생
  • 회원가입 및 로그인 시 삭제된 유저 검증 로직 추가

PR 유형

어떤 변경 사항이 있나요?

  • 새로운 기능 추가
  • 코드 리팩토링

PR Checklist

PR이 다음 요구 사항을 충족하는지 확인하세요.

  • 커밋 메시지 컨벤션에 맞게 작성했습니다. Commit message convention 참고 (Ctrl + 클릭하세요.)
  • 변경 사항에 대한 테스트를 했습니다.(버그 수정/기능에 대한 테스트).

1. UserRepository
 - Boolean existsByEmailAndIsDeletedTrue(String email) 메소드 추가
  - soft delete된 계정 확인

2. UserService
 - void checkIfUserIsDeleted(String email) 메소드 추가
  - 삭제된 계정 확인 및 DeletedUserSignupAttemptException 발생

3. 소셜 로그인 서비스 수정
 - AppleOAuthLoginService, GoogleOAuthLoginService
 - 회원가입 및 로그인 시 삭제된 유저 검증 로직 추가

4. DeletedUserSignupAttemptException 추가
 - 삭제된 계정 로그인 시도 시 발생하는 커스텀 예외
Copy link
Contributor

@liljoon liljoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sql 문 부분만 간단히 수정되면 될 것 같습니다.

1. UserRepository
 - existsByEmailAndIsDeletedTrue(String email) 메소드 쿼리 수정
  - case문에서 exists로 수정하여 더 효율적인 쿼리로 수정함
Copy link
Contributor

@liljoon liljoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네, sql문 수정된 것 확인했습니다

liljoon

This comment was marked as duplicate.

@Aram-su Aram-su merged commit 388ba2f into dev Oct 18, 2024
1 check passed
@Aram-su Aram-su deleted the feat/delete-account-exception branch October 18, 2024 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants