FC ParticulierController: remove superfluous if

This commit is contained in:
simon lehericey 2018-01-15 13:19:01 +01:00 committed by Simon Lehericey
parent 02395e732c
commit 34bd3a11e9

View file

@ -10,7 +10,6 @@ class FranceConnect::ParticulierController < ApplicationController
fetched_fc_information = FranceConnectService.retrieve_user_informations_particulier(params[:code]) fetched_fc_information = FranceConnectService.retrieve_user_informations_particulier(params[:code])
if fetched_fc_information.present?
france_connect_information = FranceConnectInformation france_connect_information = FranceConnectInformation
.find_by(france_connect_particulier_id: fetched_fc_information[:france_connect_particulier_id]) .find_by(france_connect_particulier_id: fetched_fc_information[:france_connect_particulier_id])
@ -27,7 +26,6 @@ class FranceConnect::ParticulierController < ApplicationController
end end
connect_france_connect_particulier(user) connect_france_connect_particulier(user)
end
rescue Rack::OAuth2::Client::Error => e rescue Rack::OAuth2::Client::Error => e
Rails.logger.error e.message Rails.logger.error e.message
redirect_france_connect_error_connection redirect_france_connect_error_connection