diff --git a/src/main/java/com/example/locavel/service/ReviewService.java b/src/main/java/com/example/locavel/service/ReviewService.java index c4032fd..a6da578 100644 --- a/src/main/java/com/example/locavel/service/ReviewService.java +++ b/src/main/java/com/example/locavel/service/ReviewService.java @@ -58,8 +58,8 @@ public ReviewResponseDTO.ReviewUpdateResultDTO updateReview(Long reviewId, Revie Reviews review = reviewRepository.findById(reviewId) .orElseThrow(()->new ReviewsHandler(ErrorStatus.REVIEW_NOT_FOUND)); Places place = review.getPlace(); - if(request.getRating() != null) {review.setRating(request.getRating());} - if(request.getComment() != null) {review.setComment(request.getComment());} + review.setRating(request.getRating()); + review.setComment(request.getComment()); if(reviewImgUrls != null) {uploadReviewImg(reviewImgUrls, review, true);} Reviews updatedReview = reviewRepository.save(review); placeService.setReview(place); diff --git a/src/main/java/com/example/locavel/web/controller/ReviewRestController.java b/src/main/java/com/example/locavel/web/controller/ReviewRestController.java index 699c251..ed1768f 100644 --- a/src/main/java/com/example/locavel/web/controller/ReviewRestController.java +++ b/src/main/java/com/example/locavel/web/controller/ReviewRestController.java @@ -54,7 +54,7 @@ public ApiResponse createReview( } @Operation(summary = "리뷰 수정", description = "리뷰를 수정합니다.") - @PatchMapping(value = "/{reviewId}", consumes = "multipart/form-data") + @PutMapping(value = "/{reviewId}", consumes = "multipart/form-data") public ApiResponse updateReview( @Valid @RequestPart ReviewRequestDTO.ReviewDTO request, @PathVariable(name="reviewId") Long reviewId,