~singpolyma/sgx-jmp

1c92ee3238be642882adb205847e0dae9fcd1d7e — Stephen Paul Weber 6 months ago 812d55f
ogm is sometimes a promise
1 files changed, 4 insertions(+), 2 deletions(-)

M web.rb
M web.rb => web.rb +4 -2
@@ 233,9 233,11 @@ class Web < Roda
							CustomerRepo
								.new(sgx_repo: Bwmsgsv2Repo.new)
								.find_by_tel(params["to"])
								.then do |customer|
								.then { |c|
									EMPromise.all([c, c.ogm(params["from"])])
								}.then do |(customer, ogm)|
									render :voicemail, locals: {
										ogm: customer.ogm(params["from"]),
										ogm: ogm,
										transcription_enabled: customer.transcription_enabled
									}
								end