Skip to content
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] 모든 질답 완료 시 응답값 구분 #101

Merged
merged 4 commits into from
Aug 24, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,12 @@ public GetMainViewResponseDto getMainInfo(Long userId) {
QnA lastQna = qnaList.get(parentchild.getCount()-1);
log.info("getCount(): {}", parentchild.getCount());

QnA currentQnA = parentchild.getQnaList().get(parentchild.getCount() - 1);
Copy link
Contributor

Choose a reason for hiding this comment

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

이부분 위에 있는 lastQna 재사용해도 문제 없을듯!
사실 lastQna라는 네이밍이 이제 보니 좀 이상해서
위에꺼를 currentQnA로 바꾼다음 재사용해도 괜찮을거같아!

Copy link
Member Author

Choose a reason for hiding this comment

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

헉 맞네 오케이 반영할게욥

if (parentchild.getCount() == 7 && (currentQnA.isParentAnswer() && currentQnA.isChildAnswer())) {
return GetMainViewResponseDto.of(lastQna, parentchild.getCount()+1); // 유효하지 않은 8로 반환 시 엔딩이벤트
}


return GetMainViewResponseDto.of(lastQna, parentchild.getCount());
}

Expand Down