Commit a796a807 authored by Stan Hu's avatar Stan Hu

Merge branch 'dz-scope-project-issues-routing' into 'master'

Copy issues routing under - scope

See merge request gitlab-org/gitlab!23779
parents 3b9944fc ae4caf66
---
title: Copy issues routing under - scope
merge_request: 23779
author:
type: changed
# frozen_string_literal: true
get :issues, to: 'issues#calendar', constraints: lambda { |req| req.format == :ics }
resources :issues, concerns: :awardable, constraints: { id: /\d+/ } do
member do
post :toggle_subscription
post :mark_as_spam
post :move
put :reorder
get :related_branches
get :can_create_branch
get :realtime_changes
post :create_merge_request
get :discussions, format: :json
end
collection do
post :bulk_update
post :import_csv
end
end
...@@ -401,25 +401,15 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do ...@@ -401,25 +401,15 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
end end
end end
get :issues, to: 'issues#calendar', constraints: lambda { |req| req.format == :ics } # Unscoped route. It will be replaced with redirect to /-/issues/
# Issue https://gitlab.com/gitlab-org/gitlab/issues/118849
resources :issues, concerns: :awardable, constraints: { id: /\d+/ } do draw :issues
member do
post :toggle_subscription
post :mark_as_spam
post :move
put :reorder
get :related_branches
get :can_create_branch
get :realtime_changes
post :create_merge_request
get :discussions, format: :json
end
collection do # To ensure an old unscoped routing is used for the UI we need to
post :bulk_update # add prefix 'as' to the scope routing and place it below original routing.
post :import_csv # Issue https://gitlab.com/gitlab-org/gitlab/issues/118849
end scope '-', as: 'scoped' do
draw :issues
end end
resources :notes, only: [:create, :destroy, :update], concerns: :awardable, constraints: { id: /\d+/ } do resources :notes, only: [:create, :destroy, :update], concerns: :awardable, constraints: { id: /\d+/ } do
......
# frozen_string_literal: true
resources :issues, only: [], constraints: { id: /\d+/ } do
member do
get '/descriptions/:version_id/diff', action: :description_diff, as: :description_diff
delete '/descriptions/:version_id', action: :delete_description_version, as: :delete_description_version
get '/designs(/*vueroute)', to: 'issues#designs', as: :designs, format: false
end
collection do
post :export_csv
get :service_desk
end
resources :issue_links, only: [:index, :create, :destroy], as: 'links', path: 'links'
end
...@@ -123,21 +123,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do ...@@ -123,21 +123,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
end end
end end
resources :issues, only: [], constraints: { id: /\d+/ } do
member do
get '/descriptions/:version_id/diff', action: :description_diff, as: :description_diff
delete '/descriptions/:version_id', action: :delete_description_version, as: :delete_description_version
get '/designs(/*vueroute)', to: 'issues#designs', as: :designs, format: false
end
collection do
post :export_csv
get :service_desk
end
resources :issue_links, only: [:index, :create, :destroy], as: 'links', path: 'links'
end
get '/service_desk' => 'service_desk#show', as: :service_desk get '/service_desk' => 'service_desk#show', as: :service_desk
put '/service_desk' => 'service_desk#update', as: :service_desk_refresh put '/service_desk' => 'service_desk#update', as: :service_desk_refresh
......
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