Class: CommandTower::Me::ExperienceStatesController

Inherits:
ApplicationController show all
Includes:
Auth::AuthenticationBoundary, Auth::AuthorizationBoundary
Defined in:
app/controllers/command_tower/me/experience_states_controller.rb

Constant Summary

Constants inherited from ApplicationController

ApplicationController::AUTHENTICATION_EXPIRE_HEADER, ApplicationController::AUTHENTICATION_HEADER, ApplicationController::AUTHENTICATION_WITH_RESET

Instance Method Summary collapse

Methods inherited from ApplicationController

#authenticate_user!, #authenticate_user_without_email_verification!, #authorize_user!, #current_user, #safe_boolean

Instance Method Details

#complete ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'app/controllers/command_tower/me/experience_states_controller.rb', line 20

def complete
  deserialized = CommandTower::Deserializers::Me::ExperienceStates::CompleteDeserializer.call(params)
  return render_deserializer_errors unless deserialized.success?

  result = CommandTower::Workflows::Me::ExperienceStates::CompleteWorkflow.call(
    current_user: current_user,
    experience_key: deserialized.input.experience_key,
    scope_type: deserialized.input.scope_type,
    scope_identifier: deserialized.input.scope_identifier,
    version: deserialized.input.version,
    auth_context: current_auth_context,
  )
  render_application_result(result)
end

#index ⇒ Object



12
13
14
15
16
17
18
# File 'app/controllers/command_tower/me/experience_states_controller.rb', line 12

def index
  result = CommandTower::Workflows::Me::ExperienceStates::ListWorkflow.call(
    current_user: current_user,
    auth_context: current_auth_context,
  )
  render_application_result(result)
end