summaryrefslogtreecommitdiff
path: root/app/controllers/api
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/api')
-rw-r--r--app/controllers/api/reviews_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/api/reviews_controller.rb b/app/controllers/api/reviews_controller.rb
index 951e19d..1f48362 100644
--- a/app/controllers/api/reviews_controller.rb
+++ b/app/controllers/api/reviews_controller.rb
@@ -26,7 +26,7 @@ module Api
if @review.save
render json: serialized_object.serializable_hash, status: :ok
else
- render json: { error_messages: @review.errors.full_messages }, status: :unprocessable_entity
+ render json: { errors: @review.errors.as_json }, status: :unprocessable_entity
end
end
@@ -48,7 +48,7 @@ module Api
@serialized_object ||= ProductReviewSerializer.new(
ProductReview.joins(:user_account).select('product_reviews.*',
'user_accounts.first_name as author_name')
- .find(@review.id)
+ .find(@review.id)
)
end
end