From 7b7cb5061890a91fe3a6884a8bc80569c9ed203f Mon Sep 17 00:00:00 2001 From: joonghyun Date: Mon, 13 Mar 2023 16:52:22 +0900 Subject: [PATCH] =?UTF-8?q?#160=20fix:=20=EC=83=81=ED=92=88=20=EC=83=81?= =?UTF-8?q?=EC=84=B8=20=EC=A1=B0=ED=9A=8C=20API=20response=EA=B0=92?= =?UTF-8?q?=EC=97=90=20optionIdx=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/codepatissier/keki/dessert/dto/OptionDTO.java | 1 + .../com/codepatissier/keki/dessert/service/DessertService.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/codepatissier/keki/dessert/dto/OptionDTO.java b/src/main/java/com/codepatissier/keki/dessert/dto/OptionDTO.java index 78924aa..c439774 100644 --- a/src/main/java/com/codepatissier/keki/dessert/dto/OptionDTO.java +++ b/src/main/java/com/codepatissier/keki/dessert/dto/OptionDTO.java @@ -8,6 +8,7 @@ @AllArgsConstructor @NoArgsConstructor public class OptionDTO { + private Long optionIdx; private String optionDescription; private Integer optionPrice; } diff --git a/src/main/java/com/codepatissier/keki/dessert/service/DessertService.java b/src/main/java/com/codepatissier/keki/dessert/service/DessertService.java index a90bcfe..019af9e 100644 --- a/src/main/java/com/codepatissier/keki/dessert/service/DessertService.java +++ b/src/main/java/com/codepatissier/keki/dessert/service/DessertService.java @@ -117,7 +117,7 @@ private String representPostImgUrl(List postImages){ private List getOptionList(Dessert dessert) { return optionRepository.findByDessertAndStatusOrderByOptionIdx(dessert, ACTIVE_STATUS).stream() - .map(option -> new OptionDTO(option.getDescription(), option.getPrice())).collect(Collectors.toList()); + .map(option -> new OptionDTO(option.getOptionIdx(), option.getDescription(), option.getPrice())).collect(Collectors.toList()); } /**