Respect app config when generating export URL

This commit is contained in:
Karina Kwiatek 2022-07-09 20:11:35 +02:00 committed by Karina Kwiatek
parent 6a1747eee7
commit 76b40d012b
1 changed files with 1 additions and 1 deletions

View File

@ -134,7 +134,7 @@ class Exporter
def publish
`tar czvf #{Rails.root.join "public", "export", "#{@export_filename}.tar.gz"} -C /tmp/rs_export #{@export_dirname}`
url = "https://retrospring.net/export/#{@export_filename}"
url = "#{APP_CONFIG[:https] ? 'https' : 'http'}://#{APP_CONFIG[:hostname]}/export/#{@export_filename}"
@user.export_processing = false
@user.export_url = url
@user.export_created_at = Time.now