Commit b7c3c55d authored by Lin Jen-Shin's avatar Lin Jen-Shin

Use another scope to add the - prefix, feedback:

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11407#note_30922591
parent 2197ad59
...@@ -181,35 +181,37 @@ constraints(ProjectUrlConstrainer.new) do ...@@ -181,35 +181,37 @@ constraints(ProjectUrlConstrainer.new) do
end end
end end
resources :jobs, path: '-/jobs', only: [:index, :show], constraints: { id: /\d+/ } do scope '-' do
collection do resources :jobs, only: [:index, :show], constraints: { id: /\d+/ } do
post :cancel_all collection do
post :cancel_all
resources :artifacts, only: [] do
collection do resources :artifacts, only: [] do
get :latest_succeeded, collection do
path: '*ref_name_and_path', get :latest_succeeded,
format: false path: '*ref_name_and_path',
format: false
end
end end
end end
end
member do member do
get :status get :status
post :cancel post :cancel
post :retry post :retry
post :play post :play
post :erase post :erase
get :trace, defaults: { format: 'json' } get :trace, defaults: { format: 'json' }
get :raw get :raw
end end
resource :artifacts, only: [] do resource :artifacts, only: [] do
get :download get :download
get :browse, path: 'browse(/*path)', format: false get :browse, path: 'browse(/*path)', format: false
get :file, path: 'file/*path', format: false get :file, path: 'file/*path', format: false
get :raw, path: 'raw/*path', format: false get :raw, path: 'raw/*path', format: false
post :keep post :keep
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