Skip to content

Commit

Permalink
refactor: 코드 깔끔하게 정리
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimin0304 committed Nov 27, 2023
1 parent 6371cef commit 5a778d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class ExchangeRequestController {
@PostMapping("/{exchangePostId}/request")
@Operation(summary = "기프티콘 교환 요청 등록", description = "기프티콘 교환 요청을 등록합니다.")
public ResponseEntity<BasicResponse> 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())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 5a778d1

Please sign in to comment.