Class: CommandTower::Workflows::Admin::Workspace::ManifestWorkflow

Inherits:
CommandTower::Workflows::ApplicationWorkflow show all
Defined in:
app/workflows/command_tower/workflows/admin/workspace/manifest_workflow.rb

Constant Summary

Constants inherited from CommandTower::Workflows::ApplicationWorkflow

CommandTower::Workflows::ApplicationWorkflow::ALLOWED_RETRY_STRATEGIES, CommandTower::Workflows::ApplicationWorkflow::InvalidTransactionResult, CommandTower::Workflows::ApplicationWorkflow::TransactionFailure

Instance Method Summary collapse

Methods inherited from CommandTower::Workflows::ApplicationWorkflow

call, call_from_job, continuation_max_attempts, declared_retry_strategy, mark_impersonation_activity!, retry_strategy, validate_retry_strategy!

Methods included from Impersonation::ActivityDeclaration

included

Methods included from Logging::LifecycleDeclaration

included

Methods included from Execution::ContextAccess

#audit, #execution_context, #log_debug, #log_error, #log_info, #log_warn, #publish_event

Methods included from Transactional

#fail_transaction!, #transaction

Instance Method Details

#call(user:) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
# File 'app/workflows/command_tower/workflows/admin/workspace/manifest_workflow.rb', line 10

def call(user:)
  result = CommandTower::Services::Admin::Workspace::Manifest.call(user:)
  unless result.success?
    return failure(errors: result.errors, http_status: :unprocessable_entity)
  end

  success(
    payload: CommandTower::Serializers::Admin::Workspace::ManifestSerializer.serialize(result.data[:tools]),
    http_status: :ok
  )
end