Skip to content

Commit

Permalink
Merge pull request #141 from team-offonoff/topic-response
Browse files Browse the repository at this point in the history
`TopicResponse` 댓글 수 표시
  • Loading branch information
60jong authored Jan 17, 2024
2 parents 1b03090 + 23defab commit c4eeea7
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public record TopicResponse(
String topicTitle,
Long deadline,
int voteCount,
int commentCount,
TopicContentResponse topicContent,
KeywordResponse keyword,
List<ChoiceResponse> choices,
Expand All @@ -34,6 +35,7 @@ public static TopicResponse from(Topic topic) {
topic.getTitle(),
topic.getDeadlineSecond(),
topic.getVoteCount(),
topic.getCommentCount(),
TopicContentResponseFactory.create(topic.getContent()),
KeywordResponse.from(topic.getKeyword()),
topic.getChoices().stream().map(ChoiceResponse::from).toList(),
Expand All @@ -49,6 +51,7 @@ public static TopicResponse from(Topic topic, Member retriever) {
topic.getTitle(),
topic.getDeadlineSecond(),
topic.getVoteCount(),
topic.getCommentCount(),
TopicContentResponseFactory.create(topic.getContent()),
KeywordResponse.from(topic.getKeyword()),
topic.getChoices().stream().map(ChoiceResponse::from).toList(),
Expand Down

0 comments on commit c4eeea7

Please sign in to comment.