커뮤니티 게시물 조회 - 댓글 추가 불가능한 경우 댓글조회를 하지 않도록 수정
This commit is contained in:
parent
7326babc49
commit
8c5b7b811d
|
@ -149,15 +149,19 @@ class CreatorCommunityService(
|
||||||
} else {
|
} else {
|
||||||
0
|
0
|
||||||
}
|
}
|
||||||
val commentList = commentRepository.findByPostId(
|
val commentList = if (it.isCommentAvailable) {
|
||||||
cloudFrontHost = imageHost,
|
commentRepository.findByPostId(
|
||||||
timezone = timezone,
|
cloudFrontHost = imageHost,
|
||||||
id = it.id!!,
|
timezone = timezone,
|
||||||
offset = 0,
|
id = it.id!!,
|
||||||
limit = 1
|
offset = 0,
|
||||||
)
|
limit = 1
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
listOf()
|
||||||
|
}
|
||||||
|
|
||||||
val firstComment = if (commentList.isNotEmpty()) {
|
val firstComment = if (it.isCommentAvailable && commentList.isNotEmpty()) {
|
||||||
commentList[0]
|
commentList[0]
|
||||||
} else {
|
} else {
|
||||||
null
|
null
|
||||||
|
@ -206,15 +210,19 @@ class CreatorCommunityService(
|
||||||
} else {
|
} else {
|
||||||
0
|
0
|
||||||
}
|
}
|
||||||
val commentList = commentRepository.findByPostId(
|
val commentList = if (post.isCommentAvailable) {
|
||||||
cloudFrontHost = imageHost,
|
commentRepository.findByPostId(
|
||||||
timezone = timezone,
|
cloudFrontHost = imageHost,
|
||||||
id = post.id!!,
|
timezone = timezone,
|
||||||
offset = 0,
|
id = post.id!!,
|
||||||
limit = 1
|
offset = 0,
|
||||||
)
|
limit = 1
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
listOf()
|
||||||
|
}
|
||||||
|
|
||||||
val firstComment = if (commentList.isNotEmpty()) {
|
val firstComment = if (post.isCommentAvailable && commentList.isNotEmpty()) {
|
||||||
commentList[0]
|
commentList[0]
|
||||||
} else {
|
} else {
|
||||||
null
|
null
|
||||||
|
@ -374,15 +382,19 @@ class CreatorCommunityService(
|
||||||
} else {
|
} else {
|
||||||
0
|
0
|
||||||
}
|
}
|
||||||
val commentList = commentRepository.findByPostId(
|
val commentList = if (it.isCommentAvailable) {
|
||||||
cloudFrontHost = imageHost,
|
commentRepository.findByPostId(
|
||||||
timezone = timezone,
|
cloudFrontHost = imageHost,
|
||||||
id = it.id!!,
|
timezone = timezone,
|
||||||
offset = 0,
|
id = it.id!!,
|
||||||
limit = 1
|
offset = 0,
|
||||||
)
|
limit = 1
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
listOf()
|
||||||
|
}
|
||||||
|
|
||||||
val firstComment = if (commentList.isNotEmpty()) {
|
val firstComment = if (it.isCommentAvailable && commentList.isNotEmpty()) {
|
||||||
commentList[0]
|
commentList[0]
|
||||||
} else {
|
} else {
|
||||||
null
|
null
|
||||||
|
|
Loading…
Reference in New Issue