A lib/empty_repo.rb => lib/empty_repo.rb +5 -0
@@ 0,0 1,5 @@
+# frozen_string_literal: true
+
+class EmptyRepo
+ def find(*); end
+end
M sgx_jmp.rb => sgx_jmp.rb +5 -1
@@ 82,6 82,7 @@ require_relative "lib/customer"
require_relative "lib/customer_info_form"
require_relative "lib/customer_repo"
require_relative "lib/electrum"
+require_relative "lib/empty_repo"
require_relative "lib/expiring_lock"
require_relative "lib/em"
require_relative "lib/form_to_h"
@@ 725,7 726,10 @@ Command.new(
reply.allowed_actions = [:next]
reply.command << FormTemplate.render("customer_picker")
}.then { |response|
- CustomerInfoForm.new.find_customer(response)
+ CustomerInfoForm.new(CustomerRepo.new(
+ sgx_repo: Bwmsgsv2Repo.new,
+ bandwidth_tn_repo: EmptyRepo.new # No CNAM in admin
+ )).find_customer(response)
}.then do |target_customer|
AdminCommand.new(target_customer).start
end