Exemplo n.º 1
0
        public ActionResult MakeReview([FromBody] ReviewFromCustomerDTO review)
        {
            _logger.LogInformation($"Make Review called with <{review.CustomerEmail}> <{review.ProductId}> <{review.Review}>");
            // SQL update here

            try
            {
                _repository.AddReviewForCustomer(review);
            }
            catch (NotFoundException)
            {
                return(StatusCode(500, "Customer Email not found"));
            }

            return(Ok());
        }