Skip to content

[codex] 특정 인원 투표 생성과 참여자 제한 투표 추가 - #8

Merged
Leesumok merged 3 commits into
mainfrom
feature/restricted-participant-voting
May 1, 2026
Merged

Leesumok merged 3 commits into
mainfrom
feature/restricted-participant-voting

Conversation

@Leesumok

@Leesumok Leesumok commented May 1, 2026

Copy link
Copy Markdown
Contributor

변경 사항

  • 투표 생성 버튼에서 기본 투표와 특정인원 투표 생성을 선택하는 모달을 추가했습니다.
  • /create/restricted 화면을 추가해 참여 인원과 선택지별 참여 가능 인원을 설정할 수 있게 했습니다.
  • 기존 POST /api/rooms 생성 API를 확장해 participants, option_allowed_participants 배열을 저장하도록 했습니다.
  • 제한 투표에서는 투표 화면 진입 시 참여자를 먼저 선택하게 하고, 선택할 수 없는 옵션은 비활성화했습니다.
  • 투표 제출 API에서도 참여자별 선택 가능 여부를 검증하도록 해 프론트 우회를 막았습니다.
  • 127.0.0.1:3000 등 로컬 개발 주소에서 API 호출이 가능하도록 CORS 허용 origin을 보강했습니다.

검증

  • npx eslint app/create/restricted/page.tsx lib/api.ts
  • npx eslint app/vote/[uuid]/vote-client.tsx lib/api.ts (기존 warning만 확인)
  • npx tsc --noEmit
  • PYTHONPYCACHEPREFIX=/private/tmp/fastvote-pycache python3 -m compileall app
  • 제한 투표 생성 API 응답에 participants, option_allowed_participants 저장 확인
  • 허용되지 않은 참여자/옵션 조합은 403, 허용된 조합은 200 확인
  • /create/restricted, /vote/{uuid} 페이지 200 확인

@Leesumok
Leesumok requested a review from dev-minsoo May 1, 2026 16:13
@Leesumok
Leesumok marked this pull request as ready for review May 1, 2026 16:27

@dev-minsoo dev-minsoo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@Leesumok
Leesumok merged commit 66a26b7 into main May 1, 2026
6 checks passed
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.

2 participants