Skip to content

기능(#41): 템플릿 생성 POST API 연동#65

Open
TransparentDeveloper wants to merge 7 commits into
devfrom
feat/#41-api
Open

기능(#41): 템플릿 생성 POST API 연동#65
TransparentDeveloper wants to merge 7 commits into
devfrom
feat/#41-api

Conversation

@TransparentDeveloper
Copy link
Copy Markdown
Collaborator

변경 사항

  • POST /api/v1/templates 실서버 연동 (템플릿 생성 폼 동작 구현 (/templates/create) #41 scope 확장)
  • 프론트 폼 데이터 → OpenAPI CreateTemplateRequest 매핑
    • captainsNeededteamCount, totalPointsbudget, minBidminBidUnit
    • draftMode: SEQUENTIALdraftOrderStrategy: FIXED
    • players[].tier 제외 (백엔드 스펙 확장 예정, TODO 주석)
  • validateTemplateInput 순수 도메인 함수 추가 (9개 에러 코드)
  • "방 만들기" 클릭 시 POST 호출, 성공 시 mode별 /auction/[id]·/draft/[id] 이동
  • "혼자 하기" 버튼 disabled (후속 이슈로 분리)
  • MSW POST /api/v1/templates 핸들러 제거
  • api-client: import.meta.env$env/dynamic/public 교체 (dev 환경 주입 문제 해결)

미완료 (TODO)

  • 백엔드 CORS allowed origins에 localhost:5173 및 web-fe-dev Cloud Run 도메인 추가 필요 (현재 403 차단)
  • 백엔드 OpenAPI 스펙 확장 후 gameType 4종 / PlayerRequest.tier 재반영

테스트

  • bun run check — 신규 에러 0개 (기존 코드 에러 10건은 본 PR 무관)
  • bun test — 102 pass (신규 validate 17 + mapper 6)
  • bun run lint — 신규 이슈 0개
  • 수동 QA — 백엔드 CORS 설정 후 진행 예정

@vercel vercel Bot temporarily deployed to Preview – web-fe April 13, 2026 15:23 Inactive
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 13, 2026

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

Project Deployment Actions Updated (UTC)
fantazzk Error Error Apr 13, 2026 3:23pm
web-fe Error Error Apr 13, 2026 3:23pm

@vercel vercel Bot temporarily deployed to Preview – fantazzk April 13, 2026 15:23 Inactive
TransparentDeveloper and others added 7 commits April 15, 2026 23:38
- TemplateValidationErrorType 에러 코드 유니온 정의
- validateTemplateInput(data) → 에러코드 or null
- 정상 입력 케이스 테스트

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- TemplateInputType → CreateTemplateRequestType 변환
- AUCTION/DRAFT 분기, SEQUENTIAL→FIXED 매핑, captainsNeeded→teamCount
- TODO: 백엔드 스펙 확장 후 tier/4종 gameType 반영

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- validate, mapper 모듈 re-export
- exactOptionalPropertyTypes 위반 테스트 픽스
- MSW POST /api/v1/templates 핸들러 제거 (실서버 직접 호출)
- .env.example에 PUBLIC_API_URL 안내 주석 추가

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- 방 만들기 클릭 시 POST /api/v1/templates 호출 후 mode별 이동
- validateTemplateInput 기반 버튼 활성 제어, 생성 중 표시, 실패 시 alert
- 혼자 하기 버튼은 후속 이슈까지 disabled

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- import.meta.env → $env/dynamic/public로 전환
- PUBLIC_API_URL이 dev 브라우저에 주입되지 않던 문제 해결
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.

1 participant