forked from Gitlink/forgeplus
FIX 版本库中zip包下载地址问题
This commit is contained in:
parent
7fc46e3964
commit
52872805c3
|
@ -14,11 +14,13 @@ module ProjectsHelper
|
|||
end
|
||||
|
||||
def render_zip_url(owner, repository, archive)
|
||||
[base_url, archive_repositories_path(owner&.login, repository, "#{archive}.zip")].join
|
||||
url = [base_url, archive_repositories_path(owner&.login, repository, "#{archive}.zip")].join
|
||||
url.include?("/api") ? url.gsub('/api', '') : url
|
||||
end
|
||||
|
||||
def render_tar_url(owner, repository, archive)
|
||||
[base_url, archive_repositories_path(owner&.login, repository, "#{archive}.tar.gz")].join
|
||||
url = [base_url, archive_repositories_path(owner&.login, repository, "#{archive}.tar.gz")].join
|
||||
url.include?("/api") ? url.gsub('/api', '') : url
|
||||
end
|
||||
|
||||
def render_http_url(project)
|
||||
|
|
Loading…
Reference in New Issue