Commit f091272f authored by Grzegorz Bizon's avatar Grzegorz Bizon

Move artifacts controller level up

This reverts nesting artifacts controller in builds module.
parent a96d45c6
class Projects::Builds::ArtifactsController < Projects::ApplicationController class Projects::ArtifactsController < Projects::ApplicationController
layout 'project' layout 'project'
before_action :authorize_download_build_artifacts! before_action :authorize_download_build_artifacts!
...@@ -14,7 +14,7 @@ class Projects::Builds::ArtifactsController < Projects::ApplicationController ...@@ -14,7 +14,7 @@ class Projects::Builds::ArtifactsController < Projects::ApplicationController
send_file artifacts_file.path, disposition: 'attachment' send_file artifacts_file.path, disposition: 'attachment'
end end
def view def browse
@metadata = build.artifacts_metadata @metadata = build.artifacts_metadata
end end
......
...@@ -608,13 +608,9 @@ Rails.application.routes.draw do ...@@ -608,13 +608,9 @@ Rails.application.routes.draw do
post :retry post :retry
end end
scope module: :builds do
resource :artifacts, only: [] do resource :artifacts, only: [] do
collection do
get :download get :download
get 'view(/:path)', as: :view, to: 'artifacts#view' get 'browse(/*path)', action: :browse, as: :browse
end
end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment