Skip to content

Commit

Permalink
fix import.
Browse files Browse the repository at this point in the history
  • Loading branch information
apotonick committed Jun 4, 2024
1 parent 6eea37b commit 1cb0ad0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/trailblazer/workflow/rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ module Rails
end

require "trailblazer-pro-rails"
require "trailblazer/workflow/task/import"
require_relative "rails/generator/import"
require_relative "rails/generator/discover"
4 changes: 2 additions & 2 deletions lib/trailblazer/workflow/rails/generator/import.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Import < ::Rails::Generators::Base

def import_file_via_api
# TODO: use endpoint logic here.
signal, (ctx, _) = Trailblazer::Developer.wtf?(Trailblazer::Pro::Editor::Import, [
signal, (ctx, _) = Trailblazer::Developer.wtf?(Trailblazer::Workflow::Task::Import, [
{
diagram_slug: slug,
target_filename: target,
Expand All @@ -17,7 +17,7 @@ def import_file_via_api
])

return puts("Diagram #{slug} successfully imported to #{target}.") if signal.to_h[:semantic] == :success
raise "error: #{ctx[:error_message]}"
raise "[TRB PRO] error: #{ctx[:error_message]}"
end
end # Import
end
Expand Down

0 comments on commit 1cb0ad0

Please sign in to comment.