Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
Walkthrough새로운 회원탈퇴 기능을 구현합니다. JWT 인증을 통한 DELETE /auth/withdraw 엔드포인트를 추가하고, 비밀번호 검증 후 사용자 계정과 관련 데이터(노트, 북마크, 토큰)를 삭제하는 트랜잭션 로직을 포함합니다. 프론트엔드에는 설정 페이지에 탈퇴 모달과 API 통합을 추가합니다. Changes
Sequence DiagramsequenceDiagram
participant Client as Client (Browser)
participant Controller as AuthController
participant Service as AuthService
participant DB as Database
participant NotesService as NotesService
Client->>Controller: DELETE /auth/withdraw<br/>(password/confirmText)
activate Controller
Controller->>Controller: Extract userId from JWT
Controller->>Service: withdraw(userId, dto)
deactivate Controller
activate Service
Service->>DB: Verify user exists & not admin
Service->>DB: Query user_authentications<br/>(if email-based auth)
Service->>Service: Validate password hash<br/>(if required)
rect rgba(100, 150, 200, 0.5)
Note over Service,DB: Transaction Block
Service->>NotesService: Remove user notes
activate NotesService
NotesService->>DB: Delete user notes & bookmarks
NotesService->>DB: Delete note likes
deactivate NotesService
Service->>DB: Delete user reports<br/>(NoteReport, PostReport)
Service->>DB: Delete user data<br/>(authentications, settings)
Service->>DB: Delete user
end
Service->>DB: Revoke all tokens
Service-->>Controller: Return success message
deactivate Service
Controller->>Controller: Clear access_token<br/>& refresh_token cookies
Controller-->>Client: 200 OK { message }
Client->>Client: Show success toast
Client->>Client: Redirect to login page
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
d3ae824 to
f957630
Compare
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Backend
DELETE /auth/withdraw엔드포인트 추가 (JWT 인증 필요)WithdrawDto: 이메일 계정은password, OAuth 전용은confirmText사용AuthModule에NotesModule추가Frontend
authApi.withdraw()API 클라이언트 추가Test plan
npm run build(frontend) — passnpm run build(backend, auth files) — passcd backend && npm run test:e2e— pre-existing @adminjs/typeorm module resolution issue blocks E2E (unrelated to this PR)🤖 Generated with Claude Code
Summary by CodeRabbit
릴리스 노트
새로운 기능
테스트