~singpolyma/sgx-jmp

483b5c6b41a04728484ba5d23348161966e84b5b — Stephen Paul Weber 1 year, 11 months ago f873448
Better CNAM fail error message
1 files changed, 5 insertions(+), 5 deletions(-)

M lib/customer_repo.rb
M lib/customer_repo.rb => lib/customer_repo.rb +5 -5
@@ 73,6 73,8 @@ class CustomerRepo
				use_type: "RESIDENTIAL", visibility: "PUBLIC"
			} }
		)
	rescue BandwidthIris::Errors::GenericError
		raise "Could not set CNAM, please contact support"
	end

	def put_transcription_enabled(customer, transcription_enabled)


@@ 82,9 84,8 @@ class CustomerRepo
	end

	def put_fwd(customer, customer_fwd)
		@sgx_repo.put_fwd(
			customer.customer_id, customer.registered?.phone, customer_fwd
		)
		tel = customer.registered?.phone
		@sgx_repo.put_fwd(customer.customer_id, tel, customer_fwd)
	end

protected


@@ 121,8 122,7 @@ protected
		result = @db.query_defer(SQL, [customer_id])
		EMPromise.all([@sgx_repo.get(customer_id), result]).then do |(sgx, rows)|
			data = hydrate_plan(
				customer_id,
				rows.first&.transform_keys(&:to_sym) || {}
				customer_id, rows.first&.transform_keys(&:to_sym) || {}
			)
			Customer.new(customer_id, Blather::JID.new(jid), sgx: sgx, **data)
		end