Skip to content

Commit

Permalink
[fix] delete시 nocontent 반환하도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
elive7 committed Jun 2, 2024
1 parent 3a6387b commit 66aca06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ public enum SuccessMessage {
PRODUCT_CREATE_SUCCESS(HttpStatus.CREATED.value(), "상품 등록이 완료되었습니다."),
LIKE_CREATE_SUCCESS(HttpStatus.CREATED.value(), "좋아요가 추가되었습니다."),
RRODUCT_GET_SUCCESS(HttpStatus.OK.value(),"상품 목록 조회가 완료되었습니다."),
PRODUCT_DELETE_SUCCESS(HttpStatus.OK.value(), "상품 삭제가 완료되었습니다.")
;
private final int status;
private final String message;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,9 @@ public ResponseEntity<SuccessStatusResponse<Slice<ProductFindAllDto>>> getProduc
}

@DeleteMapping("/{productId}")
public ResponseEntity<SuccessStatusResponse> deleteProduct(
@PathVariable Long productId
) {
public ResponseEntity<Void> deleteProduct(@PathVariable Long productId) {
productService.deleteProduct(productId);
return ResponseEntity.status(HttpStatus.OK)
.body(SuccessStatusResponse.of(SuccessMessage.PRODUCT_DELETE_SUCCESS));
return ResponseEntity.noContent().build();
}

}

0 comments on commit 66aca06

Please sign in to comment.