Move artifacts controller level up

This reverts nesting artifacts controller in builds module.
This commit is contained in:
Grzegorz Bizon 2015-12-18 08:41:16 +01:00
parent a96d45c694
commit f091272f19
3 changed files with 5 additions and 9 deletions

View File

@ -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

View File

@ -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