[Feat/#229] 통합 회원탈퇴 API 추가 - #230
Conversation
|
Warning Review limit reached
Next review available in: 45 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Walkthrough회원 탈퇴 API를 추가했습니다. 인증된 사용자의 활성 상태를 검증하고, 트랜잭션에서 Refresh Token을 폐기한 뒤 사용자를 soft delete합니다. Swagger 문서와 탈퇴 사용자에 대한 JWT 인증 검증도 추가했습니다. Changes회원 탈퇴 기능
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
src/auth/auth.controller.ts (1)
116-123: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value컨트롤러 메서드명을 동사와 명사로 구성하세요.
withdraw는 동사만 사용합니다. 외부 라우트는 유지하고 메서드명을withdrawUser로 변경하세요.As per path instructions, "메서드명은 동사 + 명사 형태로 작성했는지".
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/auth/auth.controller.ts` around lines 116 - 123, Rename the AuthController method withdraw to withdrawUser so it follows the verb-plus-noun naming convention, while keeping the existing DELETE withdraw route, decorators, and authService.withdraw(userId) call unchanged.Source: Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/auth/auth.service.ts`:
- Around line 394-410: Update withdraw and the refresh-token issuance service
flow so active-user validation and token creation use the same transaction and
row-locking policy as revokeAllRefreshTokens and softDeleteUser. Ensure
withdrawal locks or otherwise serializes the user record before validation, and
make refresh-token issuance recheck the locked active state within its
transaction so requests during or after withdrawal cannot persist a token.
In `@src/auth/auth.swagger.ts`:
- Line 399: Update the 500 ApiResponse declaration in the auth Swagger
configuration to include the project failure-response schema/example with
resultType "FAIL", code 500, errorCode "INTERNAL_SERVER_ERROR", the specified
Korean reason, and data null, while retaining the existing description.
---
Nitpick comments:
In `@src/auth/auth.controller.ts`:
- Around line 116-123: Rename the AuthController method withdraw to withdrawUser
so it follows the verb-plus-noun naming convention, while keeping the existing
DELETE withdraw route, decorators, and authService.withdraw(userId) call
unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 92f7a597-0a8f-4e93-a6e9-fb7272064257
📒 Files selected for processing (5)
src/auth/auth.controller.tssrc/auth/auth.service.tssrc/auth/auth.swagger.tssrc/auth/jwt.strategy.tssrc/users/user.service.ts
| }, | ||
| }, | ||
| }), | ||
| ApiResponse({ status: 500, description: '서버 내부 오류' }), |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
500 실패 응답 스키마를 명시하세요.
현재 500 응답은 설명만 제공합니다. resultType, code, errorCode, reason, data를 포함하는 프로젝트 실패 응답 예시를 추가하세요. 클라이언트가 오류 응답 형식을 Swagger에서 확인할 수 있어야 합니다.
As per coding guidelines, Use custom failure responses that follow the project format: { "resultType": "FAIL", "code": 500, "errorCode": "INTERNAL_SERVER_ERROR", "reason": "서버 내부 오류가 발생했습니다", "data": null }.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/auth/auth.swagger.ts` at line 399, Update the 500 ApiResponse declaration
in the auth Swagger configuration to include the project failure-response
schema/example with resultType "FAIL", code 500, errorCode
"INTERNAL_SERVER_ERROR", the specified Korean reason, and data null, while
retaining the existing description.
Source: Coding guidelines
📌 관련 이슈번호
(Closes 키워드가 있어야 PR이 머지되었을 때 이슈가 자동으로 닫힌다)
📌 PR 유형
어떤 변경 사항이 있나요?
📌 PR 요약
로그인한 사용자가 앱 내에서 회원탈퇴를 진행할 수 있도록 통합 회원탈퇴 API를 추가했습니다.
📌 작업 세부 내용
DELETE /api/v1/auth/withdraw회원탈퇴 API를 추가했습니다.📸 스크린샷 (선택)
🔗 참고 자료