From 5a778d15be61eb634a3a33c44958b0efab103623 Mon Sep 17 00:00:00 2001 From: Jimin0304 Date: Mon, 27 Nov 2023 18:33:44 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EC=BD=94=EB=93=9C=20=EA=B9=94?= =?UTF-8?q?=EB=81=94=ED=95=98=EA=B2=8C=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exchange/controller/ExchangeRequestController.java | 2 +- .../CSP2/switchcon/exchange/service/ExchangePostService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/CSP2/switchcon/exchange/controller/ExchangeRequestController.java b/src/main/java/com/CSP2/switchcon/exchange/controller/ExchangeRequestController.java index b4c4c92..da237b6 100644 --- a/src/main/java/com/CSP2/switchcon/exchange/controller/ExchangeRequestController.java +++ b/src/main/java/com/CSP2/switchcon/exchange/controller/ExchangeRequestController.java @@ -24,7 +24,7 @@ public class ExchangeRequestController { @PostMapping("/{exchangePostId}/request") @Operation(summary = "기프티콘 교환 요청 등록", description = "기프티콘 교환 요청을 등록합니다.") public ResponseEntity addExchangeRequest(@ReqMember SecurityUserDetails securityUserDetails, - @PathVariable("exchangePostId") long exchangePostId, + @PathVariable("exchangePostId") long exchangePostId, @RequestBody ExchangeRequestDTO requestDTO) { return basicResponse.ok( exchangeRequestService.addExchangeRequest(securityUserDetails.member(), exchangePostId, requestDTO.getGifticonId()) diff --git a/src/main/java/com/CSP2/switchcon/exchange/service/ExchangePostService.java b/src/main/java/com/CSP2/switchcon/exchange/service/ExchangePostService.java index c0c583a..5045dd8 100644 --- a/src/main/java/com/CSP2/switchcon/exchange/service/ExchangePostService.java +++ b/src/main/java/com/CSP2/switchcon/exchange/service/ExchangePostService.java @@ -122,7 +122,7 @@ public void delExchange(Member member, long exchangePostId) { if (!exchangePost.getGifticon().getMember().getId().equals(member.getId())) throw new BusinessException(ErrorCode.FORBIDDEN_ACCESS_EXCHANGE_POST); - exchangePostRepository.deleteByIdAndMember(member, exchangePostId); + exchangePostRepository.delete(exchangePost); exchangePost.getGifticon().updateActive(true); }