fix: 리뷰 목록이 cursor null을 첫 페이지로 처리 - #487
Conversation
- productReviews·storeReviews의 cursor는 SDL nullable인데 service가 !== undefined로만 걸러, cursor: null이 커서 파싱에 들어가 400(INVALID_CURSOR·INVALID_LIKES_CURSOR) - service ?? undefined 정규화 + DTO cursor를 | null로 선언(다음 누락은 tsc가 잡게) - 회귀: 두 범위 × LATEST·LIKES에서 cursor null이면 첫 페이지 4건(수정 전 4건 모두 커서 형식 오류로 실패 확인)
|
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)진단 470건 (error 12).
architecture / security 상위 항목
|
Coverage report
Test suite run success3727 tests passing in 355 suites. Report generated by 🧪jest coverage report action from 9c5a685 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
배경
productReviews·storeReviews의cursor는 SDL에서 nullable인데,cursor: null을 보내면 첫 페이지 대신 400(INVALID_CURSOR·INVALID_LIKES_CURSOR)이 났습니다.input.cursor를 그대로 넘기고 아래에서!== undefined로만 걸러, null이 커서 파싱으로 들어갔습니다.변경
review-listing.service.ts에서input.cursor ?? undefined로 정규화했습니다.cursor를string | null로 선언했습니다(정규화가 빠지면 tsc가 막도록).테스트
cursor: null이면 첫 페이지를 돌려주는 4건을 추가했습니다.플랜 대조
cursorRaw: input.cursor ?? undefined