summaryrefslogtreecommitdiff
path: root/app/controllers/api
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/api')
-rw-r--r--app/controllers/api/v1/profiles_controller.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/api/v1/profiles_controller.rb b/app/controllers/api/v1/profiles_controller.rb
index e0b223a9..59bcaf6b 100644
--- a/app/controllers/api/v1/profiles_controller.rb
+++ b/app/controllers/api/v1/profiles_controller.rb
@@ -7,7 +7,9 @@ module Api
def update
@profile = current_user
- @profile.update(secure_params)
+ unless @profile.update(secure_params)
+ render json: @profile.errors, status: :unprocessable_entity
+ end
end
private