From ab4a2d0e6b5b4a3db37bb0447c31a16aef71ed42 Mon Sep 17 00:00:00 2001 From: Klaus Date: Thu, 7 Sep 2023 16:14:15 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=91=EC=9B=90=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?=EA=B8=B0=EB=8A=A5=20=EB=A6=AC=ED=8C=A9=ED=86=A0=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sodalive/explorer/ExplorerService.kt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerService.kt index 74ccc70..4738f03 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerService.kt @@ -371,18 +371,19 @@ class ExplorerService( val cheers = queryRepository.getCheers(request.cheersId) ?: throw SodaException("잘못된 요청입니다.") - if (cheers.creator!!.id!! != member.id!!) { - if (cheers.member!!.id != member.id!!) { - throw SodaException("잘못된 요청입니다.") - } - + if (cheers.member!!.id!! == member.id!!) { if (request.content != null) { cheers.cheers = request.content } } - if (request.isActive != null) { - cheers.isActive = request.isActive + if ( + cheers.creator!!.id!! == member.id!! || + cheers.member!!.id!! == member.id!! + ) { + if (request.isActive != null) { + cheers.isActive = request.isActive + } } }