콘텐츠 댓글 수정 기능 리팩토링
This commit is contained in:
parent
056e575e7c
commit
37f2f5e40b
|
@ -67,20 +67,21 @@ class AudioContentCommentService(
|
||||||
val audioContentComment = repository.findByIdOrNull(request.commentId)
|
val audioContentComment = repository.findByIdOrNull(request.commentId)
|
||||||
?: throw SodaException("잘못된 접근 입니다.\n확인 후 다시 시도해 주세요.")
|
?: throw SodaException("잘못된 접근 입니다.\n확인 후 다시 시도해 주세요.")
|
||||||
|
|
||||||
if (audioContentComment.audioContent!!.member!!.id!! != member.id!!) {
|
if (audioContentComment.id!! == member.id!!) {
|
||||||
if (audioContentComment.member == null || audioContentComment.member!!.id!! != member.id!!) {
|
|
||||||
throw SodaException("잘못된 접근 입니다.\n확인 후 다시 시도해 주세요.")
|
|
||||||
}
|
|
||||||
|
|
||||||
if (request.comment != null) {
|
if (request.comment != null) {
|
||||||
audioContentComment.comment = request.comment
|
audioContentComment.comment = request.comment
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
audioContentComment.id!! == member.id!! ||
|
||||||
|
audioContentComment.audioContent!!.member!!.id!! != member.id!!
|
||||||
|
) {
|
||||||
if (request.isActive != null) {
|
if (request.isActive != null) {
|
||||||
audioContentComment.isActive = request.isActive
|
audioContentComment.isActive = request.isActive
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun getCommentList(audioContentId: Long, timezone: String, pageable: Pageable): GetAudioContentCommentListResponse {
|
fun getCommentList(audioContentId: Long, timezone: String, pageable: Pageable): GetAudioContentCommentListResponse {
|
||||||
val commentList =
|
val commentList =
|
||||||
|
|
Loading…
Reference in New Issue