diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-23 18:08:41 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-23 18:08:41 +0300 |
commit | 5eeb39104356356bec81abe19479bca591e6f299 (patch) | |
tree | 7534ccf94fb8100ce39b78278d275b2061773f95 /config/routes | |
parent | b7e512c8970dcce6feabc096885c7a1ea91e4694 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config/routes')
-rw-r--r-- | config/routes/project.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/config/routes/project.rb b/config/routes/project.rb index d00e0ab1d04..48279b36fc1 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -369,6 +369,19 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do end end + # Serve snippet routes under /-/snippets. + # To ensure an old unscoped routing is used for the UI we need to + # add prefix 'as' to the scope routing and place it below original routing. + # Issue https://gitlab.com/gitlab-org/gitlab/-/issues/29572 + scope '-', as: :scoped do + resources :snippets, concerns: :awardable, constraints: { id: /\d+/ } do # rubocop: disable Cop/PutProjectRoutesUnderScope + member do + get :raw + post :mark_as_spam + end + end + end + namespace :prometheus do resources :alerts, constraints: { id: /\d+/ }, only: [:index, :create, :show, :update, :destroy] do # rubocop: disable Cop/PutProjectRoutesUnderScope post :notify, on: :collection |