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-248] 사용자 약관 동의 기능 구현 #65

Merged
merged 3 commits into from
Nov 4, 2024
Merged

Conversation

Aram-su
Copy link
Contributor

@Aram-su Aram-su commented Nov 4, 2024

개요

NB-248
주요 변경사항:

  • User 엔티티에 약관 동의 필드 추가

  • privacyAgreement : 개인정보 처리 방침 동의

  • serviceAgreement : 서비스 이용 약관 동의

  • API 엔드 포인트 구현

  • PATCH "/v1/users/agreement"

  • 사용자별 약관 동의 상태 업데이트

구현 상세:

  • Repository : 약관 동의 상태 업데이트 쿼리 추가
  • Service : 약관 동의 처리 및 예외 처리 로직 구현
  • Controller : 약관 동의 엔드포인트 구현
  • DTO : 약관 동의 요청/응답 구조 정의
  • Exception : 다중 사용자 업데이트 방지를 위한 예외 정의

PR 유형

어떤 변경 사항이 있나요?

  • 새로운 기능 추가

PR Checklist

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

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

사용자의 개인정보 처리 방침과 서비스 이용 약관 동의를 처리하는 기능 구현

주요 변경사항:
 - User 엔티티에 약관 동의 필드 추가
  - privacyAgreement : 개인정보 처리 방침 동의
  - serviceAgreement : 서비스 이용 약관 동의

 - API 엔드 포인트 구현
  - PATCH "/v1/users/agreement"
  - 사용자별 약관 동의 상태 업데이트

구현 상세:
 - Repository : 약관 동의 상태 업데이트 쿼리 추가
 - Service : 약관 동의 처리 및 예외 처리 로직 구현
 - Controller : 약관 동의 엔드포인트 구현
 - DTO : 약관 동의 요청/응답 구조 정의
 - Exception : 다중 사용자 업데이트 방지를 위한 예외 정의
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.

약관 동의 api 확인했습니다.
에러 반환 부분만 수정해주시면 될 것 같습니다.

약관 동의 업데이트 실패 시 예외 던지도록 수정

주요 변경사항:
 - 약관 동의 처리 로직 수정
  - 실패 시 UserAgreementUpdateFailException 발생

구현 상세:
 - Service : 약관 동의 실패 처리 로직 수정
 - Exception : 사용자 약관 동의 업데이트 실패를 위한 예외 정의
약관 동의 업데이트 실패 시 발생되는 예외의 상태코드를 404 -> 500 으로 변경함

변경 사유:
 - 업데이트 되지 않았다는 의미에서 404 처리를 하려 했으나, 팀원과의 논의 상 업데이트 되지 않는 상황이라면 userId가 잘못된 것일 텐데 access token의 userId가 잘못되었다면 서버 측의 발급이 잘못되었을 것이다 라는 논의가 있어 수정함.
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.

에처 처리 수정된 것 확인했습니다.

@Aram-su Aram-su merged commit 16bc9bb into dev Nov 4, 2024
1 check passed
@Aram-su Aram-su deleted the feat/terms-agreement branch November 4, 2024 08:53
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