From 37f2f5e40b610a0c40457998d75e033229ceed2b Mon Sep 17 00:00:00 2001 From: Klaus Date: Wed, 6 Sep 2023 15:54:27 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BD=98=ED=85=90=EC=B8=A0=20=EB=8C=93?= =?UTF-8?q?=EA=B8=80=20=EC=88=98=EC=A0=95=20=EA=B8=B0=EB=8A=A5=20=EB=A6=AC?= =?UTF-8?q?=ED=8C=A9=ED=86=A0=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../content/comment/AudioContentCommentService.kt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/content/comment/AudioContentCommentService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/content/comment/AudioContentCommentService.kt index fb6f527..9dd6a27 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/content/comment/AudioContentCommentService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/content/comment/AudioContentCommentService.kt @@ -67,18 +67,19 @@ class AudioContentCommentService( val audioContentComment = repository.findByIdOrNull(request.commentId) ?: throw SodaException("잘못된 접근 입니다.\n확인 후 다시 시도해 주세요.") - if (audioContentComment.audioContent!!.member!!.id!! != member.id!!) { - if (audioContentComment.member == null || audioContentComment.member!!.id!! != member.id!!) { - throw SodaException("잘못된 접근 입니다.\n확인 후 다시 시도해 주세요.") - } - + if (audioContentComment.id!! == member.id!!) { if (request.comment != null) { audioContentComment.comment = request.comment } } - if (request.isActive != null) { - audioContentComment.isActive = request.isActive + if ( + audioContentComment.id!! == member.id!! || + audioContentComment.audioContent!!.member!!.id!! != member.id!! + ) { + if (request.isActive != null) { + audioContentComment.isActive = request.isActive + } } }