0
0
Fork 0

make it not return http 400 when passing and empty source argument (#12259)

* make it not return http 400 when passing and empty source argument

* create a spec for the empty source hash bug

* compact checks for nil, empty? parameters

* use nil.blank? instead checking for nil
This commit is contained in:
Jennifer Glauche 2019-11-16 19:02:09 +01:00 committed by Eugen Rochko
parent 286bf45d4c
commit fd93a9c871
2 changed files with 14 additions and 1 deletions

View file

@ -25,7 +25,7 @@ class Api::V1::Accounts::CredentialsController < Api::BaseController
end
def user_settings_params
return nil unless params.key?(:source)
return nil if params[:source].blank?
source_params = params.require(:source)