Commit d9d1dc99 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix commits routing

parent 6e4ee0df
...@@ -239,7 +239,7 @@ Gitlab::Application.routes.draw do ...@@ -239,7 +239,7 @@ Gitlab::Application.routes.draw do
resources :group_members, only: [:index, :create, :update, :destroy] do resources :group_members, only: [:index, :create, :update, :destroy] do
delete :leave, on: :collection delete :leave, on: :collection
end end
resource :avatar, only: [:destroy] resource :avatar, only: [:destroy]
resources :milestones, only: [:index, :show, :update] resources :milestones, only: [:index, :show, :update]
end end
...@@ -321,7 +321,6 @@ Gitlab::Application.routes.draw do ...@@ -321,7 +321,6 @@ Gitlab::Application.routes.draw do
get :branches, on: :member get :branches, on: :member
end end
resources :commits, only: [:show], constraints: { id: /(?:[^.]|\.(?!atom$))+/, format: /atom/ }
resources :compare, only: [:index, :create] resources :compare, only: [:index, :create]
scope do scope do
...@@ -333,6 +332,15 @@ Gitlab::Application.routes.draw do ...@@ -333,6 +332,15 @@ Gitlab::Application.routes.draw do
) )
end end
scope do
get(
'/commits/*id',
to: 'commits#show',
constraints: { id: /(?:[^.]|\.(?!atom$))+/, format: /atom/ },
as: :commits
)
end
resources :network, only: [:show], constraints: { id: /(?:[^.]|\.(?!json$))+/, format: /json/ } resources :network, only: [:show], constraints: { id: /(?:[^.]|\.(?!json$))+/, format: /json/ }
resources :graphs, only: [:show], constraints: { id: /(?:[^.]|\.(?!json$))+/, format: /json/ } do resources :graphs, only: [:show], constraints: { id: /(?:[^.]|\.(?!json$))+/, format: /json/ } do
member do member do
......
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