diff --git a/app/jobs/email_csv_job.rb b/app/jobs/email_csv_job.rb index ae9711d3e..ca63e2870 100644 --- a/app/jobs/email_csv_job.rb +++ b/app/jobs/email_csv_job.rb @@ -30,7 +30,7 @@ class EmailCsvJob < ApplicationJob storage_service.write_file(filename, BYTE_ORDER_MARK + csv_string) csv_download = CsvDownload.create!(user:, organisation: user.organisation, filename:, download_type: log_type, expiration_time: EXPIRATION_TIME) - url = download_csv_download_path(csv_download.id) + url = download_csv_download_url(csv_download.id, host: ENV["APP_HOST"]) CsvDownloadMailer.new.send_csv_download_mail(user, url, EXPIRATION_TIME) end diff --git a/app/jobs/scheme_email_csv_job.rb b/app/jobs/scheme_email_csv_job.rb index ddef947e0..0c9c1b696 100644 --- a/app/jobs/scheme_email_csv_job.rb +++ b/app/jobs/scheme_email_csv_job.rb @@ -33,7 +33,7 @@ class SchemeEmailCsvJob < ApplicationJob storage_service.write_file(filename, BYTE_ORDER_MARK + csv_string) csv_download = CsvDownload.create!(user:, organisation: user.organisation, filename:, download_type:, expiration_time: EXPIRATION_TIME) - url = download_csv_download_path(csv_download.id) + url = download_csv_download_url(csv_download.id, host: ENV["APP_HOST"]) CsvDownloadMailer.new.send_csv_download_mail(user, url, EXPIRATION_TIME) end