Skip to content

Commit

Permalink
Merge pull request #89 from YAPP-Github/fix/image-path
Browse files Browse the repository at this point in the history
image 없을 시 path null 처리
  • Loading branch information
devk0ng authored Oct 28, 2023
2 parents 317b8a1 + 1e5c5ac commit cb865d0
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ private Criteria createFilterCriteria(List<Recommend> recommends, List<Category>
}

//리뷰 좋아요
@Transactional
public void likeReview(String productId, String reviewId, Long writerId) throws Throwable {
BaseProduct baseProduct = (BaseProduct) basicProductRepository
.findById(productId)
Expand All @@ -101,7 +100,6 @@ public void likeReview(String productId, String reviewId, Long writerId) throws
}

//리뷰 싫어요
@Transactional
public void hateReview(String productId, String reviewId, Long writerId) throws Throwable {
BaseProduct baseProduct = (BaseProduct) basicProductRepository
.findById(productId)
Expand All @@ -123,9 +121,9 @@ public void registerReview(MultipartFile image, ReviewRequestDto reviewDto, Stri
.findById(productId)
.orElseThrow(NoSuchElementException::new);

String filePath = "None";
String filePath = null;

if (image != null) {
if (image != null && !image.isEmpty()) {
filePath = imageRepository.uploadImage(image);
}

Expand Down

0 comments on commit cb865d0

Please sign in to comment.