diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-30 18:07:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-30 18:07:51 +0300 |
commit | 4e9acbfba3682c552b3de707c535e6257ef41054 (patch) | |
tree | 8b1fd5f89ad3f1be68d8944815b13bb7d498e4a6 /config/routes.rb | |
parent | 506d6dcd7c787ba71a8a53102f3d4fdb6adcfa5e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config/routes.rb')
-rw-r--r-- | config/routes.rb | 55 |
1 files changed, 37 insertions, 18 deletions
diff --git a/config/routes.rb b/config/routes.rb index 466555eeee8..a8b2a9b6656 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -71,6 +71,8 @@ Rails.application.routes.draw do # Health check get 'health_check(/:checks)' => 'health_check#index', as: :health_check + # Begin of the /-/ scope. + # Use this scope for all new global routes. scope path: '-' do # '/-/health' implemented by BasicHealthCheck middleware get 'liveness' => 'health#liveness' @@ -122,6 +124,10 @@ Rails.application.routes.draw do draw :country_state draw :subscription draw :analytics + + scope '/push_from_secondary/:geo_node_id' do + draw :git_http + end end if ENV['GITLAB_CHAOS_SECRET'] || Rails.env.development? || Rails.env.test? @@ -136,7 +142,24 @@ Rails.application.routes.draw do # Notification settings resources :notification_settings, only: [:create, :update] + + resources :invites, only: [:show], constraints: { id: /[A-Za-z0-9_-]+/ } do + member do + post :accept + match :decline, via: [:get, :post] + end + end + + resources :sent_notifications, only: [], constraints: { id: /\h{32}/ } do + member do + get :unsubscribe + end + end + + # Spam reports + resources :abuse_reports, only: [:new, :create] end + # End of the /-/ scope. concern :clusterable do resources :clusters, only: [:index, :new, :show, :update, :destroy] do @@ -167,22 +190,24 @@ Rails.application.routes.draw do end end - # Invites - resources :invites, only: [:show], constraints: { id: /[A-Za-z0-9_-]+/ } do - member do - post :accept - match :decline, via: [:get, :post] + # Deprecated routes. + # Will be removed as part of https://gitlab.com/gitlab-org/gitlab/-/issues/210024 + scope as: :deprecated do + resources :invites, only: [:show], constraints: { id: /[A-Za-z0-9_-]+/ } do + member do + post :accept + match :decline, via: [:get, :post] + end end - end - resources :sent_notifications, only: [], constraints: { id: /\h{32}/ } do - member do - get :unsubscribe + resources :sent_notifications, only: [], constraints: { id: /\h{32}/ } do + member do + get :unsubscribe + end end - end - # Spam reports - resources :abuse_reports, only: [:new, :create] + resources :abuse_reports, only: [:new, :create] + end resources :groups, only: [:index, :new, :create] do post :preview_markdown @@ -192,12 +217,6 @@ Rails.application.routes.draw do get '/projects/:id' => 'projects#resolve' - Gitlab.ee do - scope '/-/push_from_secondary/:geo_node_id' do - draw :git_http - end - end - draw :git_http draw :api draw :sidekiq |