Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LG-12534 FSM clean up #11578

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
25 changes: 10 additions & 15 deletions app/controllers/idv/in_person_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,25 @@ class InPersonController < ApplicationController

before_action :confirm_two_factor_authenticated
before_action :redirect_unless_enrollment

include IdvSessionConcern
include Flow::FlowStateMachine
include ThreatMetrixConcern

before_action :redirect_if_flow_completed

before_action :initialize_in_person_session
before_action :set_usps_form_presenter

FLOW_STATE_MACHINE_SETTINGS = {
step_url: :idv_in_person_step_url,
final_url: :idv_in_person_state_id_url,
flow: Idv::Flows::InPersonFlow,
analytics_id: 'In Person Proofing',
}.freeze
def index
redirect_to idv_in_person_state_id_url
end

def update
redirect_to idv_in_person_state_id_url
end

private

def redirect_unless_enrollment
redirect_to idv_url unless current_user.establishing_in_person_enrollment
end

def redirect_if_flow_completed
flow_finish if idv_session.applicant
def initialize_in_person_session
user_session['idv/in_person'] ||= { pii_from_user: { uuid: current_user.uuid } }
end

def set_usps_form_presenter
Expand Down
85 changes: 0 additions & 85 deletions app/services/flow/base_flow.rb

This file was deleted.

86 changes: 0 additions & 86 deletions app/services/flow/base_step.rb

This file was deleted.

14 changes: 0 additions & 14 deletions app/services/flow/failure.rb

This file was deleted.

Loading