-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEAT] #3 투표 생성 #16
[FEAT] #3 투표 생성 #16
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
확인했습니다
|
||
// 2. 옵션 개수가 2개 ~ 6개 인지 확인 후 예외처리 | ||
int size = requestDto.getOptions().size(); | ||
if (size < 2 || size > 6) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2, 6 이런거 min, max 이런식으로 정의해두고 하면 좋지 않을까요?
// 2. 옵션 개수가 2개 ~ 6개 인지 확인 후 예외처리 | ||
int size = requestDto.getOptions().size(); | ||
if (size < 2 || size > 6) { | ||
throw new OptionNumException("선택지의 개수는 2개 이하 6개 이상이어야 합니다."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이런 부분도 나중에 바뀌게 되면 놓칠수도 있으니까 위에거랑 한번에 바꾸면 좋지않을까요?
System.out.println(requestDto); | ||
VoteEntity vote = voteJPARepository.save(requestDto.toEntity()); | ||
long voteId = vote.getId(); | ||
for (CreateVoteRequest.OptionDTO option : requestDto.getOptions()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DTO랑 Dto랑 하나만 선택하면 좋을거같아요
} | ||
|
||
@Getter | ||
@Setter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setter발견
어떤 내용에 대한 PR인가요?
투표 생성에 관한 pr입니다.
투표 옵션 이미지 처리는 미구현입니다.
변경 사항
변경된 부분에 대한 상세한 내용을 나열해주세요
무엇을 위주로 보면 좋을까요?
관련된 이슈
투표 생성 (#3)
테스트 방법
컨트롤러 테스트