Skip to content

Commit

Permalink
Addressing pr comments for improved code styling
Browse files Browse the repository at this point in the history
  • Loading branch information
AShukla-GSA committed Jan 23, 2025
1 parent 28fe500 commit 73e47aa
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,14 @@ class DocumentCaptureController < ApplicationController
include SocureErrorsConcern

check_or_render_not_found -> { IdentityConfig.store.socure_docv_enabled }
before_action :validate_step_not_completed, only: [:show]
before_action :check_valid_document_capture_session, except: [:update]
before_action -> do
redirect_to_correct_vendor(Idp::Constants::Vendors::SOCURE, in_hybrid_mobile: true)
end, only: :show
before_action :fetch_test_verification_data, only: [:update]

def show
if stored_result&.success?
redirect_to idv_hybrid_mobile_capture_complete_url
return
end

Funnel::DocAuth::RegisterStep.new(document_capture_user.id, sp_session[:issuer])
.call('hybrid_mobile_socure_document_capture', :view, true)

Expand Down Expand Up @@ -89,6 +85,11 @@ def errors

private

def validate_step_not_completed
return if stored_result.blank? || !stored_result.success?
redirect_to idv_hybrid_mobile_capture_complete_url
end

def socure_errors_presenter(result)
SocureErrorPresenter.new(
error_code: error_code_for(result),
Expand Down

0 comments on commit 73e47aa

Please sign in to comment.