Skip to content

Commit

Permalink
null check 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
devk0ng committed Oct 10, 2023
1 parent 7b54559 commit c534d55
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 84 deletions.
80 changes: 0 additions & 80 deletions src/main/java/com/pyonsnalcolor/config/SecurityConfig.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ private Criteria createFilterCriteria(List<Recommend> recommends, List<Category>
}

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

//리뷰 싫어요
@Transactional
public void hateReview(String productId, String reviewId) throws Throwable {
BaseProduct baseProduct = (BaseProduct) basicProductRepository
.findById(productId)
Expand All @@ -119,15 +117,14 @@ public void hateReview(String productId, String reviewId) throws Throwable {
}

//리뷰 등록
@Transactional
public void registerReview(MultipartFile image, ReviewDto reviewDto, String productId) throws Throwable {
BaseProduct baseProduct = (BaseProduct) basicProductRepository
.findById(productId)
.orElseThrow(NoSuchElementException::new);

String filePath = "None";

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

Expand Down

0 comments on commit c534d55

Please sign in to comment.