Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

image 없을 시 path null 처리 #89

Merged
merged 1 commit into from
Oct 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading