This commit is contained in:
BoHung Chiu 2021-09-29 19:30:09 +08:00
parent 56bee2dab0
commit 9c4fe707c2
1 changed files with 9 additions and 9 deletions

View File

@ -129,16 +129,16 @@ class ArchivesController < ApplicationController
"file-url" => "/xhr/archive/download?file=#{file.id}"
}
end
if archive.urls.present?
archive.urls.each_with_index do |url,i|
files << {
"file-name" => archive.title,
"file-type" => archive.get_url_text(i),
"file-url" => url
}
end
end
end
if archive.urls.present?
archive.urls.each_with_index do |url,i|
files << {
"file-name" => archive.title,
"file-type" => archive.get_url_text(i),
"file-url" => url
}
end
end
{
"archive-title" => archive.title,
"description" => archive.description,