Skip to content

Commit

Permalink
fix: isMine 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
rlaisqls committed Nov 27, 2023
1 parent 4cc2b6e commit bd99a53
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@ data class QuestionDetailResponse(
createdAt = createdAt
)
}


}
}

Expand Down Expand Up @@ -165,6 +163,7 @@ data class AnswerResponse(
val isLiked: Boolean,
val dislikeCount: Int,
val isDisliked: Boolean,
val isMine: Boolean,
val comments: List<CommentResponse>
) {
companion object {
Expand All @@ -179,6 +178,7 @@ data class AnswerResponse(
isLiked = isLiked,
dislikeCount = dislikeCount,
isDisliked = isDisliked,
isMine = answers.writerId == user.id,
comments = commentList.distinct().map { CommentResponse.of(
comments = it,
isOwner = answers.writerId == user.id || it.writer.id == user.id
Expand Down

0 comments on commit bd99a53

Please sign in to comment.