FIX 解决标签列表和发行版列表中下周zip包、tar包导致的404问题

This commit is contained in:
jasder 2021-06-30 14:30:01 +08:00
parent 62d1a2378c
commit f19219a467
2 changed files with 6 additions and 6 deletions

View File

@ -2,8 +2,8 @@ json.array! @tags do |tag|
if tag.present?
json.name tag['name']
json.id tag['id']
json.zipball_url tag['zipball_url']
json.tarball_url tag['tarball_url']
json.zipball_url render_zip_url(@owner, @repository, tag['name'])
json.tarball_url render_tar_url(@owner, @repository, tag['name'])
json.commit do
json.sha tag['commit']['sha']
end

View File

@ -14,8 +14,8 @@ json.releases do
json.name re["name"]
json.body re["body"]
json.url re["url"]
json.tarball_url re["tarball_url"]
json.zipball_url re["zipball_url"]
json.tarball_url render_tar_url(@owner, @repository, re["tag_name"])
json.zipball_url render_zip_url(@owner, @repository, re["tag_name"])
json.draft re["draft"] ? "草稿" : (re["prerelease"] ? "预发行" : "稳定")
json.created_at format_time(version.created_at.to_s.to_time)
json.published_at format_time(version.created_at.to_s.to_time)
@ -30,8 +30,8 @@ json.releases do
json.name re["name"]
json.body re["body"]
json.url re["url"]
json.tarball_url re["tarball_url"]
json.zipball_url re["zipball_url"]
json.tarball_url render_tar_url(@owner, @repository, re["tag_name"])
json.zipball_url render_zip_url(@owner, @repository, re["tag_name"])
json.draft re["draft"] ? "草稿" : (re["prerelease"] ? "预发行" : "稳定")
json.created_at format_time(version.created_at.to_s.to_time)
json.published_at format_time(version.created_at.to_s.to_time)