fix: 판매자가 숨김 상품 상세를 열 수 있게 - #491
Conversation
- sellerProducts는 숨김(is_active=false) 상품도 보여주는데 sellerProduct만 is_active: true인 findProductById를 써서 목록에서 연 숨김 상품이 PRODUCT_NOT_FOUND - sellerProduct를 findProductByIdIncludingInactive로 전환(lifecycle·option·taxonomy 판매자 경로와 같은 메서드, store_id 소유 범위 그대로, soft-delete는 루트 findFirst가 제외) - 두 메서드 include가 동일해 toProductOutput 매핑은 변화 없음 - 호출처가 없어진 findProductById 삭제, repository spec의 store_id 불일치·카테고리/태그 삭제 가드 케이스는 남은 메서드로 이전 - 회귀: 숨김 본인 상품 상세는 isActive false로 반환(수정 전 PRODUCT_NOT_FOUND로 실패 확인), soft-delete 상품은 PRODUCT_NOT_FOUND 유지
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
🧹 knip — dead-code 리포트전체 리포트
|
🩺 NestJS Doctor — 90/100 (Excellent)진단 469건 (error 12).
architecture / security 상위 항목
|
Coverage report
Test suite run success3730 tests passing in 355 suites. Report generated by 🧪jest coverage report action from 471bd85 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
배경
sellerProducts)은 숨긴 상품도 보여 주는데, 상세(sellerProduct)만is_active: true로 찾아 숨긴 자기 상품을 열면PRODUCT_NOT_FOUND가 났습니다.변경
sellerProduct가findProductByIdIncludingInactive를 쓰게 바꿨습니다.findProductById를 지웠습니다.테스트
isActive: false로 돌아오는 케이스를 추가했습니다. 수정을 되돌리면PRODUCT_NOT_FOUND로 실패하는 것을 확인했습니다.PRODUCT_NOT_FOUND인 케이스를 추가했습니다. 다른 매장 상품 케이스는 기존 것을 그대로 둡니다.플랜 대조
findProductByIdIncludingInactive로 전환(소유권·삭제 제외 유지)PRODUCT_NOT_FOUND