~singpolyma/sgx-jmp

f05cb038ac2592cc333f4c1f9fcdaa8cf4a89625 — Stephen Paul Weber 19 days ago 846e969
rename can't span fs, use mv
1 files changed, 3 insertions(+), 2 deletions(-)

M web.rb
M web.rb => web.rb +3 -2
@@ 1,12 1,13 @@
# frozen_string_literal: true

require "digest"
require "fileutils"
require "forwardable"
require "multibases"
require "multihashes"
require "roda"
require "thin"
require "sentry-ruby"
require "thin"

require_relative "lib/call_attempt_repo"
require_relative "lib/cdr"


@@ 444,7 445,7 @@ class Web < Roda
				)
				ogm = OGMDownload.new(jmp_media_url)
				ogm.download.then do
					File.rename(ogm.path, "#{CONFIG[:ogm_path]}/#{ogm.cid}")
					FileUtils.mv(ogm.path, "#{CONFIG[:ogm_path]}/#{ogm.cid}")
					File.chmod(0o644, "#{CONFIG[:ogm_path]}/#{ogm.cid}")
					customer_repo.find(params["customer_id"]).then do |customer|
						customer.set_ogm_url("#{CONFIG[:ogm_web_root]}/#{ogm.cid}.mp3")