summaryrefslogtreecommitdiff
path: root/app/controllers/api/v1
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-10-04 20:43:04 -0600
committermo khan <mo@mokhan.ca>2014-10-04 20:43:04 -0600
commit9398cadede4b73f781c049924d5bdfd4bb133b3b (patch)
tree23e1a0ce12f65b34fdef55018ae58870a9e8cd22 /app/controllers/api/v1
parent1b7caffe6ebcd9564cd5f15049324d00b3294b11 (diff)
add twitter validation.
Diffstat (limited to 'app/controllers/api/v1')
-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