summaryrefslogtreecommitdiff
path: root/app/controllers/api/cards_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/api/cards_controller.rb')
-rw-r--r--app/controllers/api/cards_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/api/cards_controller.rb b/app/controllers/api/cards_controller.rb
index 41d6138..daf5f3a 100644
--- a/app/controllers/api/cards_controller.rb
+++ b/app/controllers/api/cards_controller.rb
@@ -16,7 +16,7 @@ module Api
if @card.save
render json: serialized_object.serializable_hash, status: :ok
else
- render json: { error_messages: @card.errors.full_messages }, status: :unprocessable_entity
+ render json: { errors: @card.errors.as_json }, status: :unprocessable_entity
end
end
@@ -28,7 +28,7 @@ module Api
if @card.update(permitted_params)
render json: serialized_object.serializable_hash, status: :ok
else
- render json: { error_messages: @card.errors.full_messages }, status: :unprocessable_entity
+ render json: { errors: @card.errors.as_json }, status: :unprocessable_entity
end
end