[Feat/#225] AI 일기 요약 ON/OFF 설정 API 구현 - #226
Conversation
|
Warning Review limit reached
Next review available in: 34 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 (3)
Walkthrough사용자별 AI 일기 요약 설정을 변경하는 ChangesAI 요약 설정
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 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: 1
🧹 Nitpick comments (1)
src/users/user.service.ts (1)
298-298: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winDTO 전체를 엔터티에 복사하지 마세요.
Object.assign는updateAiSummaryDto의 열거 가능한 자체 속성을 모두foundUser에 복사합니다. API 요청이 DTO를 기준으로 검증되지만 엔터티에는 허용되지 않는 추가 필드가 저장되지 않도록 explicit하게foundUser.isAiSummary = updateAiSummaryDto.isAiSummary;만 업데이트하세요.🤖 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/users/user.service.ts` at line 298, In the user update flow, replace the broad Object.assign call on foundUser with an explicit update of only foundUser.isAiSummary from updateAiSummaryDto.isAiSummary. Do not copy any other DTO properties onto the entity.
🤖 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/users/user.service.ts`:
- Around line 293-301: Update the user summary method around the current
userRepository.findOne/Object.assign/save flow to perform a partial
Repository.update using only isAiSummary from updateAiSummaryDto. Check the
update result’s affected count and throw NotFoundException when no user was
updated; otherwise return the requested isAiSummary value without saving or
overwriting unrelated UserEntity fields.
---
Nitpick comments:
In `@src/users/user.service.ts`:
- Line 298: In the user update flow, replace the broad Object.assign call on
foundUser with an explicit update of only foundUser.isAiSummary from
updateAiSummaryDto.isAiSummary. Do not copy any other DTO properties onto the
entity.
🪄 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: 062db939-7e6b-48df-ad67-2cb5801840fa
📒 Files selected for processing (6)
src/users/entities/refresh-token.entity.tssrc/users/entities/user-agreement.entity.tssrc/users/user.service.tssrc/users/users.controller.tssrc/users/users.dto.tssrc/users/users.swagger.ts
💤 Files with no reviewable changes (2)
- src/users/entities/user-agreement.entity.ts
- src/users/entities/refresh-token.entity.ts
📌 관련 이슈번호
(Closes 키워드가 있어야 PR이 머지되었을 때 이슈가 자동으로 닫힌다)
📌 PR 유형
어떤 변경 사항이 있나요?
📌 PR 요약
AI 일기 요약 ON/OFF 설정 API 구현
📌 작업 세부 내용
📸 스크린샷 (선택)
🔗 참고 자료