Use URL helper, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5142#note_13880889
This commit is contained in:
parent
abf1cffff8
commit
73bbaffbfc
|
@ -35,10 +35,14 @@ class Projects::ArtifactsController < Projects::ApplicationController
|
|||
end
|
||||
|
||||
def search
|
||||
if params[:path]
|
||||
url = namespace_project_build_url(project.namespace, project, build)
|
||||
path = params[:path]
|
||||
|
||||
redirect_to "#{url}/artifacts/#{params[:path]}"
|
||||
if %w[download browse file].include?(path)
|
||||
redirect_to send(
|
||||
"#{path}_namespace_project_build_artifacts_url",
|
||||
project.namespace,
|
||||
project,
|
||||
build)
|
||||
else
|
||||
render_404
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue