Skip to content

[Fix] 모임 참석투표 요청 바디 수정 + 지원서 인증 후속 처리 - #235

Merged
ming0o merged 4 commits into
developfrom
fix/234
Jul 30, 2026
Merged

[Fix] 모임 참석투표 요청 바디 수정 + 지원서 인증 후속 처리#235
ming0o merged 4 commits into
developfrom
fix/234

Conversation

@ming0o

@ming0o ming0o commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

🔗 관련 이슈

Closes #234

🎀 PR 유형

어떤 변경 사항이 있나요?

  • 새로운 기능 추가
  • 버그 수정
  • CSS 등 사용자 UI 디자인 변경
  • 코드에 영향을 주지 않는 변경사항(오타 수정, 탭 사이즈 변경, 변수명 변경)
  • 코드 리팩토링
  • 주석 추가 및 수정
  • 문서 수정
  • 테스트 추가, 테스트 리팩토링
  • 빌드 부분 혹은 패키지 매니저 수정
  • 파일 혹은 폴더명 수정
  • 파일 혹은 폴더 삭제

✨ 추가/수정 내용

무엇을

  • 모임 참석투표 요청 바디를 {decision: PASS|FAIL, reason}{status: ATTENDING|NOT_ATTENDING}으로 수정 (모임 쪽 VoteDecision 중복 정의 제거, AttendanceVote 타입 분리)
  • client.ts isPublicAuthPath/applications 추가 (/admin/applications는 매칭 안 되게 startsWith)
  • 지원서 복원(pre-fill) 시 isEmailVerified: true로 되살리지 않고 이메일 재인증을 받도록 수정

왜 이 방식으로

  • BE GatheringDTO.VoteRequest가 실제로 받는 바디가 {status}입니다. 스웨거는 지원자 쪽 VoteRequest와 DTO 레코드명이 충돌해 잘못 표기된 상태라(7/5 동안님 공유) BE 코드를 기준으로 맞췄습니다.
  • 비로그인 지원자가 401을 받으면 인터셉터가 refresh를 시도하다 실패해 /login으로 이동하며 작성 내용이 소실됩니다. 서버가 제출 시 emailAuthCode를 Redis와 대조하므로, 복원된 폼은 인증을 다시 받아야만 유효한 코드로 제출할 수 있습니다.

어떻게 테스트했는지

  • npm run build 통과, npm run lint 0 errors (warning 9건은 기존 파일들의 기존 경고)
  • dev 화면에서 모임 참석/불참 투표 저장, 지원서 복원 → 재인증 요구 확인 예정

🎊 PR Checklist

PR이 다음 요구 사항을 충족하는지 확인하세요.

  • 커밋 메시지 컨벤션에 맞게 작성했습니다. Commit message convention 참고 (Ctrl + 클릭하세요.)
  • 변경 사항에 대한 테스트를 했습니다.(버그 수정/기능에 대한 테스트).

Summary by CodeRabbit

  • 새 기능

    • 모임 참석 투표가 ‘참석’ 또는 ‘불참’ 상태로 제공됩니다.
    • 모임 상세 화면에서 현재 참석 투표 상태를 확인하고 선택할 수 있습니다.
  • 버그 수정

    • 신청서 임시 저장 내용을 복원해도 이메일 인증 상태가 유지되지 않으며, 제출 전 인증을 다시 진행해야 합니다.
    • 인증이 필요한 주요 경로의 로그인 및 접근 처리가 조정되었습니다.

ming0o added 3 commits July 30, 2026 17:20
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 — 복원 후에도 인증을 다시 받아야 제출 가능하도록 변경.
@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
frontend Ready Ready Preview Jul 30, 2026 8:38am

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@ming0o, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 47 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: abcb1b5e-86f2-44f4-96f6-f3c38219a4ad

📥 Commits

Reviewing files that changed from the base of the PR and between 260ac0f and 930c649.

📒 Files selected for processing (1)
  • src/api/client.ts

Walkthrough

모임 참석 투표를 ATTENDING/NOT_ATTENDING 기반으로 변경하고 관련 API·화면·훅을 연동했습니다. 공개 지원서 인증 경로 판정과 지원서 초안 복원 시 이메일 인증 상태도 수정했습니다.

Changes

모임 참석 투표 및 지원서 인증 흐름

Layer / File(s) Summary
참석 투표 API 계약
src/api/gathering.api.ts, src/api/index.ts
투표 타입을 AttendanceVote로 교체하고 요청 바디를 { status } 형식으로 변경했습니다.
참석 투표 화면 및 훅 연동
src/app/meeting/[id]/page.tsx, src/hooks/meeting/useGatherings.ts
투표 옵션, 기본 선택값, 사용자 선택 상태 및 API 호출이 참석 상태 값을 사용하도록 변경했습니다.
지원서 인증 상태 처리
src/api/client.ts, src/app/apply/form/page.tsx
/applications 경로를 공개 인증 경로에 포함하고, 복원된 초안의 이메일 인증 상태를 유지하지 않도록 변경했습니다.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • cbu-manage/frontend#214: 모임 API 통합과 기존 투표 타입 및 gatheringApi.vote 사용에 직접 연관됩니다.

Suggested labels: bug

Suggested reviewers: ryeoeunn

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 모임 참석투표 바디 수정과 지원서 인증 후속 처리라는 핵심 변경을 정확히 요약합니다.
Linked Issues check ✅ Passed 모임 투표 바디를 AttendanceVote로 바꾸고, /applications 401 처리와 복원 후 이메일 재인증까지 요구해 링크된 요구사항을 충족합니다.
Out of Scope Changes check ✅ Passed 요구사항 범위인 투표 요청, 인증 경로, 지원서 복원 처리에만 집중된 변경으로 보이며 명확한 무관 변경은 보이지 않습니다.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/234

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 68e1b14 and 260ac0f.

📒 Files selected for processing (6)
  • src/api/client.ts
  • src/api/gathering.api.ts
  • src/api/index.ts
  • src/app/apply/form/page.tsx
  • src/app/meeting/[id]/page.tsx
  • src/hooks/meeting/useGatherings.ts

Comment thread src/api/client.ts Outdated
@ming0o
ming0o merged commit 1c3ad69 into develop Jul 30, 2026
4 checks passed
@ming0o
ming0o deleted the fix/234 branch July 30, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fix] 모임 참석투표 요청 바디 수정 + 지원서 인증 후속 처리

1 participant