diff --git a/src/main/java/com/api/trip/domain/item/controller/ItemController.java b/src/main/java/com/api/trip/domain/item/controller/ItemController.java index 3daed66..3f513c7 100644 --- a/src/main/java/com/api/trip/domain/item/controller/ItemController.java +++ b/src/main/java/com/api/trip/domain/item/controller/ItemController.java @@ -27,9 +27,9 @@ public ResponseEntity createItem(@RequestBody @Valid CreateItemRequest ite return ResponseEntity.ok(itemService.createItemByDirect(itemRequest)); } - @GetMapping("/{ItemId}") - public ResponseEntity getItem(@PathVariable Long ItemId) { - return ResponseEntity.ok(itemService.getItemDetail(ItemId)); + @GetMapping("/{itemId}") + public ResponseEntity getItem(@PathVariable(name = "itemId") Long itemId) { + return ResponseEntity.ok(itemService.getItemDetail(itemId)); } @GetMapping diff --git a/src/main/java/com/api/trip/domain/item/controller/dto/GetItemResponse.java b/src/main/java/com/api/trip/domain/item/controller/dto/GetItemResponse.java index c8b22e5..df90776 100644 --- a/src/main/java/com/api/trip/domain/item/controller/dto/GetItemResponse.java +++ b/src/main/java/com/api/trip/domain/item/controller/dto/GetItemResponse.java @@ -22,6 +22,8 @@ public class GetItemResponse { private Integer minPrice; + private String imageUrl; + public static GetItemResponse of(Item item){ return GetItemResponse.builder() .id(item.getId()) @@ -31,6 +33,7 @@ public static GetItemResponse of(Item item){ .buyUrl(item.getBuyUrl()) .maxPrice(item.getMaxPrice()) .minPrice(item.getMinPrice()) + .imageUrl(item.getImageUrl()) .build(); }