Skip to content

[fix] 큐레이션 커버 이미지 필수 검증 제거#43

Merged
hyejj19 merged 1 commit intomainfrom
feature/curation-optional-image
Apr 4, 2026
Merged

[fix] 큐레이션 커버 이미지 필수 검증 제거#43
hyejj19 merged 1 commit intomainfrom
feature/curation-optional-image

Conversation

@hyejj19
Copy link
Copy Markdown
Collaborator

@hyejj19 hyejj19 commented Apr 4, 2026

변경 사항 (Changes)

  • Zod 스키마에서 coverImageUrl 필드의 min(1) 필수 검증 제거
  • 커버 이미지 카드 제목의 * 필수 표시 제거
  • 이미지 미등록 시 coverImageUrlundefined로 변환하여 API 요청에서 제외

변경 이유 (Reason for Changes)

커버 이미지는 필수가 아닌데 폼 검증에서 필수로 강제하고 있었습니다.
API 타입(CurationCreateRequest, CurationUpdateRequest)에서도 coverImageUrl?: string으로 이미 선택 필드인데, 프론트 스키마만 min(1)로 막고 있어서 불일치가 있었습니다.

테스트 방법 (Test Procedure)

  • 큐레이션 등록 페이지에서 커버 이미지 없이 나머지 필수 항목만 입력 후 등록 → 정상 등록 확인
  • 기존 큐레이션 수정 시 커버 이미지 삭제 후 저장 → 정상 저장 확인
  • 커버 이미지 업로드 후 등록/수정 → 기존과 동일하게 동작 확인

참고 사항 (Additional Information)

  • 이미지 미등록 시 빈 문자열("")을 undefined로 변환하여 요청 body에서 제외합니다
  • 백엔드에서 coverImageUrl 미전송 시 null로 처리될 것으로 예상됩니다

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 4, 2026 12:17
@hyejj19 hyejj19 merged commit f26768e into main Apr 4, 2026
4 checks passed
@hyejj19 hyejj19 deleted the feature/curation-optional-image branch April 4, 2026 12:18
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

큐레이션 등록/수정 폼에서 커버 이미지(coverImageUrl)를 필수로 강제하던 프론트 검증/표시를 제거하고, 미등록 시 API 요청에서 해당 필드를 제외하도록 정리한 PR입니다.

Changes:

  • Zod 스키마에서 coverImageUrlmin(1) 필수 검증 제거
  • 커버 이미지 카드 타이틀의 필수 표시(*) 및 커버 이미지 에러 메시지 UI 제거
  • submit 시 coverImageUrl === ''이면 undefined로 변환해 요청 body에서 제외

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/pages/curations/useCurationDetailForm.ts submit 시 빈 문자열 커버 이미지 값을 undefined로 변환하여 요청에서 제외
src/pages/curations/CurationDetail.tsx 커버 이미지 섹션의 필수 표시/에러 표시 UI 제거
src/pages/curations/curation.schema.ts coverImageUrl 필수(min) 검증 제거로 선택 입력 허용

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