Repository navigation
fix: 본문이 비어 있으면 게시글 작성, 수정을 제출할 수 없게 함 - #225
Merged
Merged
Conversation
|
Warning Review limit reachedNext included review available in 36 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository: SEMOSAN/SEMOSAN_FE/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
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 |
Contributor
|
확인했습니다! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
문제
게시글 작성/수정에서 본문을 비운 채로 제출할 수 있었습니다.
useWriteForm의 제출 가능 조건이 제목만 보고 있었습니다.서버는
title과content를 둘 다 필수로 받습니다(FreePostCreateRequest.required: ["content", "title"],POST /api/community/free-posts→400 본문 누락). 그래서 제목만 쓰고 완료를 누르면 버튼이 활성화된 채 요청이 나가고, 400을 받아 "게시글 업로드에 실패했어요" 토스트만 뜹니다. 사용자는 무엇이 잘못됐는지 알 수 없습니다.변경
본문이 비어 있으면 제출 버튼이 기존 비활성 스타일(
bg-fill-disabled)로 유지됩니다. 제목이 비었을 때와 동일한 동작이라 새로운 UI는 추가하지 않았습니다. 작성/수정 두 모드 모두 같은 훅을 쓰므로 함께 적용됩니다.회귀 방지 테스트를 추가했습니다(5 케이스 — 정상/본문 빈 값/제목 빈 값/공백만 입력/입력 후 삭제).
확인 범위
댓글 작성(
comment-input-bar.tsx)은 이미!text.trim()가드가 있어 같은 문제가 없습니다. 게시글 폼만 비어 있었습니다.