public IActionResult UpdateReview(UpdateReviewDTO reviewDTO) { if (_reviewService.Update(reviewDTO)) { return(Ok()); } return(NotFound(new { message = "Review not found" })); }
public bool Update(UpdateReviewDTO reviewDTO) { bool isUpdated = true; var review = _reviewRepository.FindById(reviewDTO.Id); if (review == null) { isUpdated = false; return(isUpdated); } review.Content = reviewDTO.Content; _reviewRepository.Update(review); return(isUpdated); }