From 00d6d6c5adf455e827ff567d685ebc29c4d65577 Mon Sep 17 00:00:00 2001 From: parkduhwan Date: Tue, 27 Aug 2024 23:13:20 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B6=94=EC=B2=9C=20=EC=97=AC=EB=B6=80=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 반환 값 변경 --- src/main/java/com/example/healthylife/service/HeartService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/example/healthylife/service/HeartService.java b/src/main/java/com/example/healthylife/service/HeartService.java index 41cbc67..ee9f8ca 100644 --- a/src/main/java/com/example/healthylife/service/HeartService.java +++ b/src/main/java/com/example/healthylife/service/HeartService.java @@ -57,6 +57,6 @@ public boolean hasUserLiked(Long todaySq, Long userSq) { Optional heart = heartRepository.findByUserAndToday(user, today); - return heart.isPresent() && heart.get().getStatus(); + return heart.map(HeartEntity::getStatus).orElse(false); } }