~singpolyma/sgx-jmp

67c9b0ee4d490e896242d618c630cf2d6a48e85f — Stephen Paul Weber 3 months ago 0e75ca4
Import some hotfixes from prod
3 files changed, 6 insertions(+), 5 deletions(-)

M lib/registration.rb
M sgx_jmp.rb
M web.rb
M lib/registration.rb => lib/registration.rb +2 -1
@@ 5,10 5,11 @@ require "ruby-bandwidth-iris"
require "securerandom"

require_relative "./alt_top_up_form"
require_relative "./command"
require_relative "./bandwidth_tn_order"
require_relative "./command"
require_relative "./em"
require_relative "./oob"
require_relative "./proxied_jid"
require_relative "./tel_selections"

class Registration

M sgx_jmp.rb => sgx_jmp.rb +1 -1
@@ 431,7 431,7 @@ Command.new(
	list_for: ->(*) { true },
	customer_repo: CustomerRepo.new(sgx_repo: Bwmsgsv2Repo.new)
) {
	Command.customer.catch {
	Command.customer.catch_only(CustomerRepo::NotFound) {
		Sentry.add_breadcrumb(Sentry::Breadcrumb.new(message: "Customer.create"))
		Command.execution.customer_repo.create(Command.execution.iq.from.stripped)
	}.then { |customer|

M web.rb => web.rb +3 -3
@@ 82,7 82,7 @@ class Web < Roda

	def log_error(e)
		log.error(
			"Error raised during #{request.full_path}: #{e.class}",
			"Error raised during #{request.fullpath}: #{e.class}",
			e,
			loggable_params
		)


@@ 269,13 269,13 @@ class Web < Roda
				end

				r.post do
					Sentry.set_user(tel: params["to"])
					customer_repo(
						sgx_repo: Bwmsgsv2Repo.new
					).find_by_tel(params["to"]).then { |customer|
						Sentry.set_user(id: customer.customer_id)
						EMPromise.all([
							customer.customer_id,
							customer.fwd,
							customer.customer_id, customer.fwd,
							call_attempt_repo.find_inbound(
								customer, params["from"], call_id: params["callId"]
							)