From d2c589a79c70c13f5fccad50d74cb48c924fa83a Mon Sep 17 00:00:00 2001 From: ahyoon99 Date: Tue, 3 Sep 2024 11:18:45 +0900 Subject: [PATCH] =?UTF-8?q?Service=EC=9D=98=20findById=EB=A5=BC=20find?= =?UTF-8?q?=EB=A1=9C=20Rename=ED=95=98=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Related to: #37 --- .../com/example/naverrestaurant/controller/ApiController.java | 2 +- .../naverrestaurant/wishlist/service/WishListService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/example/naverrestaurant/controller/ApiController.java b/src/main/java/com/example/naverrestaurant/controller/ApiController.java index 61866e6..591d112 100644 --- a/src/main/java/com/example/naverrestaurant/controller/ApiController.java +++ b/src/main/java/com/example/naverrestaurant/controller/ApiController.java @@ -18,7 +18,7 @@ public class ApiController { @GetMapping("/findById") public WishListDto findById(@RequestParam int index){ - return wishListService.findById(index); + return wishListService.find(index); } @GetMapping("/search") diff --git a/src/main/java/com/example/naverrestaurant/wishlist/service/WishListService.java b/src/main/java/com/example/naverrestaurant/wishlist/service/WishListService.java index 128f86f..fe5ddcb 100644 --- a/src/main/java/com/example/naverrestaurant/wishlist/service/WishListService.java +++ b/src/main/java/com/example/naverrestaurant/wishlist/service/WishListService.java @@ -100,7 +100,7 @@ public void delete(int index) { wishListRepository.deleteById(index); } - public WishListDto findById(int index) { + public WishListDto find(int index) { Optional wishListEntity = wishListRepository.findById(index); if(!wishListEntity.isPresent()){ // wishListEntity에 값이 없으면 Exception 처리하기 throw new IllegalArgumentException();