Use another scope to add the - prefix, feedback:

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11407#note_30922591
This commit is contained in:
Lin Jen-Shin 2017-05-31 16:56:00 +08:00
parent 2197ad5943
commit b7c3c55dfa
1 changed files with 26 additions and 24 deletions

View File

@ -181,35 +181,37 @@ constraints(ProjectUrlConstrainer.new) do
end
end
resources :jobs, path: '-/jobs', only: [:index, :show], constraints: { id: /\d+/ } do
collection do
post :cancel_all
scope '-' do
resources :jobs, only: [:index, :show], constraints: { id: /\d+/ } do
collection do
post :cancel_all
resources :artifacts, only: [] do
collection do
get :latest_succeeded,
path: '*ref_name_and_path',
format: false
resources :artifacts, only: [] do
collection do
get :latest_succeeded,
path: '*ref_name_and_path',
format: false
end
end
end
end
member do
get :status
post :cancel
post :retry
post :play
post :erase
get :trace, defaults: { format: 'json' }
get :raw
end
member do
get :status
post :cancel
post :retry
post :play
post :erase
get :trace, defaults: { format: 'json' }
get :raw
end
resource :artifacts, only: [] do
get :download
get :browse, path: 'browse(/*path)', format: false
get :file, path: 'file/*path', format: false
get :raw, path: 'raw/*path', format: false
post :keep
resource :artifacts, only: [] do
get :download
get :browse, path: 'browse(/*path)', format: false
get :file, path: 'file/*path', format: false
get :raw, path: 'raw/*path', format: false
post :keep
end
end
end