Move artifacts controller level up
This reverts nesting artifacts controller in builds module.
This commit is contained in:
parent
a96d45c694
commit
f091272f19
|
@ -1,4 +1,4 @@
|
|||
class Projects::Builds::ArtifactsController < Projects::ApplicationController
|
||||
class Projects::ArtifactsController < Projects::ApplicationController
|
||||
layout 'project'
|
||||
before_action :authorize_download_build_artifacts!
|
||||
|
||||
|
@ -14,7 +14,7 @@ class Projects::Builds::ArtifactsController < Projects::ApplicationController
|
|||
send_file artifacts_file.path, disposition: 'attachment'
|
||||
end
|
||||
|
||||
def view
|
||||
def browse
|
||||
@metadata = build.artifacts_metadata
|
||||
end
|
||||
|
|
@ -608,13 +608,9 @@ Rails.application.routes.draw do
|
|||
post :retry
|
||||
end
|
||||
|
||||
scope module: :builds do
|
||||
resource :artifacts, only: [] do
|
||||
collection do
|
||||
get :download
|
||||
get 'view(/:path)', as: :view, to: 'artifacts#view'
|
||||
end
|
||||
end
|
||||
resource :artifacts, only: [] do
|
||||
get :download
|
||||
get 'browse(/*path)', action: :browse, as: :browse
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue