|
|
|
@@ -262,7 +262,7 @@ class RepositoriesController < ApplicationController |
|
|
|
archive_url = "/repos/#{@owner.login}/#{@repository.identifier}/archive/#{Addressable::URI.escape(params[:archive])}"
|
|
|
|
|
|
|
|
file_path = [domain, api_url, archive_url].join
|
|
|
|
file_path = [file_path, "access_token=#{current_user&.gitea_token}"].join("?")
|
|
|
|
file_path = [file_path, "access_token=#{@owner&.gitea_token}"].join("?")
|
|
|
|
|
|
|
|
return render_not_found if !request.format.zip? && !request.format.gzip?
|
|
|
|
|
|
|
|
@@ -275,7 +275,7 @@ class RepositoriesController < ApplicationController |
|
|
|
|
|
|
|
url = "/repos/#{@owner.login}/#{@repository.identifier}/raw/#{Addressable::URI.escape(params[:filepath])}?ref=#{Addressable::URI.escape(params[:ref])}"
|
|
|
|
file_path = [domain, api_url, url].join
|
|
|
|
file_path = [file_path, "access_token=#{current_user&.gitea_token}"].join("&")
|
|
|
|
file_path = [file_path, "access_token=#{@owner&.gitea_token}"].join("&")
|
|
|
|
|
|
|
|
redirect_to file_path
|
|
|
|
end
|
|
|
|
|