From ebb7f77ce3391acbbc38be78567357012578fbf5 Mon Sep 17 00:00:00 2001 From: yurim0628 <139152515+yurim0628@users.noreply.github.com> Date: Fri, 19 Jan 2024 03:13:45 +0900 Subject: [PATCH] Update ProductService.java --- .../domain/product/service/ProductService.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/site/goldenticket/domain/product/service/ProductService.java b/src/main/java/site/goldenticket/domain/product/service/ProductService.java index 22f13ed5..ae4525c8 100644 --- a/src/main/java/site/goldenticket/domain/product/service/ProductService.java +++ b/src/main/java/site/goldenticket/domain/product/service/ProductService.java @@ -161,12 +161,12 @@ public ProductResponse updateProduct(ProductRequest productRequest, Long product @Transactional public Long deleteProduct(Long productId) { Product product = getProduct(productId); - productRepository.delete(product); - + String updateUrl = buildReservationUrl(RESERVATION_UPDATE_STATUS_ENDPOINT, product.getReservationId()); - restTemplateService.put(updateUrl, new UpdateReservationStatusRequest(NOT_REGISTERED)); - + + productRepository.delete(product); + return productId; }