Conversation
BE GatheringDTO.VoteRequest는 {status: ATTENDING|NOT_ATTENDING}을 받는데
지원자 투표 바디 {decision: PASS|FAIL, reason}을 보내고 있어 400 발생.
스웨거는 지원자 VoteRequest와 DTO 레코드명 충돌로 오표기 상태라 BE 코드 기준.
모임 쪽 VoteDecision 중복 정의를 제거하고 AttendanceVote로 분리.
/applications는 비로그인 지원자가 쓰는 공개 경로인데 isPublicAuthPath에 빠져 있어, 서버가 401(이메일 인증 실패 등)을 주면 인터셉터가 토큰 갱신을 시도하다 실패해 /login으로 이동하며 작성 중인 지원서가 소실됨.
복원(pre-fill) 시 isEmailVerified를 true로 되살리면 emailAuthCode가 빈 값으로 제출됨. 서버가 제출 시 인증코드를 Redis와 대조하므로 항상 401 — 복원 후에도 인증을 다시 받아야 제출 가능하도록 변경.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 47 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 (1)
Walkthrough모임 참석 투표를 Changes모임 참석 투표 및 지원서 인증 흐름
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: 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: 1
🧹 Nitpick comments (1)
src/api/gathering.api.ts (1)
126-128: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win투표 요청 계약에 대한 회귀 테스트를 추가해 주세요.
Line 127-128은
{ status: "ATTENDING" | "NOT_ATTENDING" }만 전송하므로, 두 상태의 URL과 request body를 검증하는 API mock 테스트를 추가하면 이전{ decision, reason }형식의 회귀를 방지할 수 있습니다.🤖 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/api/gathering.api.ts` around lines 126 - 128, 어텐던스 투표 API의 회귀 테스트를 추가해 `vote`가 각 상태(`ATTENDING`, `NOT_ATTENDING`)에 대해 올바른 `/gatherings/{id}/vote` URL과 `{ status }` request body만 전송하는지 API mock으로 검증하세요. 이전 `{ decision, reason }` 형식이 사용되지 않는지도 확인하고, 기존 테스트 구조와 mock 도구를 재사용하세요.
🤖 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/api/client.ts`:
- Around line 15-18: Update the URL check in the client’s public-path condition
to match only the exact `/applications` path or paths beginning with
`/applications/`, excluding similarly prefixed routes such as
`/applications-old` and `/applications2`. Normalize or otherwise account for
query strings so valid `/applications` requests with queries still match, while
preserving the existing `/validate` behavior.
---
Nitpick comments:
In `@src/api/gathering.api.ts`:
- Around line 126-128: 어텐던스 투표 API의 회귀 테스트를 추가해 `vote`가 각 상태(`ATTENDING`,
`NOT_ATTENDING`)에 대해 올바른 `/gatherings/{id}/vote` URL과 `{ status }` request body만
전송하는지 API mock으로 검증하세요. 이전 `{ decision, reason }` 형식이 사용되지 않는지도 확인하고, 기존 테스트 구조와
mock 도구를 재사용하세요.
🪄 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: a57b234f-4448-4d2e-8352-06fc464ad3f7
📒 Files selected for processing (6)
src/api/client.tssrc/api/gathering.api.tssrc/api/index.tssrc/app/apply/form/page.tsxsrc/app/meeting/[id]/page.tsxsrc/hooks/meeting/useGatherings.ts
🔗 관련 이슈
Closes #234
🎀 PR 유형
어떤 변경 사항이 있나요?
✨ 추가/수정 내용
무엇을
{decision: PASS|FAIL, reason}→{status: ATTENDING|NOT_ATTENDING}으로 수정 (모임 쪽VoteDecision중복 정의 제거,AttendanceVote타입 분리)client.tsisPublicAuthPath에/applications추가 (/admin/applications는 매칭 안 되게 startsWith)isEmailVerified: true로 되살리지 않고 이메일 재인증을 받도록 수정왜 이 방식으로
GatheringDTO.VoteRequest가 실제로 받는 바디가{status}입니다. 스웨거는 지원자 쪽VoteRequest와 DTO 레코드명이 충돌해 잘못 표기된 상태라(7/5 동안님 공유) BE 코드를 기준으로 맞췄습니다.emailAuthCode를 Redis와 대조하므로, 복원된 폼은 인증을 다시 받아야만 유효한 코드로 제출할 수 있습니다.어떻게 테스트했는지
npm run build통과,npm run lint0 errors (warning 9건은 기존 파일들의 기존 경고)🎊 PR Checklist
PR이 다음 요구 사항을 충족하는지 확인하세요.
Summary by CodeRabbit
새 기능
버그 수정