summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-05-31 16:56:00 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-05-31 16:56:00 +0800
commitb7c3c55dfa4053719a481b09f926df68b57d3468 (patch)
tree16ba86b3fb1f6e56ee47c814adeee817c67f4ff4 /config
parent2197ad594338ce891c0b908cfbeba8709b718647 (diff)
downloadgitlab-ce-b7c3c55dfa4053719a481b09f926df68b57d3468.tar.gz
Use another scope to add the - prefix, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11407#note_30922591
Diffstat (limited to 'config')
-rw-r--r--config/routes/project.rb52
1 files changed, 27 insertions, 25 deletions
diff --git a/config/routes/project.rb b/config/routes/project.rb
index 6f45661c2e3..5aac44fce10 100644
--- a/config/routes/project.rb
+++ b/config/routes/project.rb
@@ -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
-
- resources :artifacts, only: [] do
- collection do
- get :latest_succeeded,
- path: '*ref_name_and_path',
- format: false
+ 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
+ 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