summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-20 13:37:37 -0700
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-20 13:37:37 -0700
commitd9d1dc99bcf57a2214616cb3d80144b2306f0b8f (patch)
treefc0a726838a3ff8a4757c7edd5ec4e547d59de4b
parent6e4ee0df3cdf5bba2a09b77579dcc0ba24e5a521 (diff)
downloadgitlab-ce-d9d1dc99bcf57a2214616cb3d80144b2306f0b8f.tar.gz
Fix commits routing
-rw-r--r--config/routes.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/config/routes.rb b/config/routes.rb
index e65ef30afb7..cfcc2d3c202 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -239,7 +239,7 @@ Gitlab::Application.routes.draw do
resources :group_members, only: [:index, :create, :update, :destroy] do
delete :leave, on: :collection
end
-
+
resource :avatar, only: [:destroy]
resources :milestones, only: [:index, :show, :update]
end
@@ -321,7 +321,6 @@ Gitlab::Application.routes.draw do
get :branches, on: :member
end
- resources :commits, only: [:show], constraints: { id: /(?:[^.]|\.(?!atom$))+/, format: /atom/ }
resources :compare, only: [:index, :create]
scope do
@@ -333,6 +332,15 @@ Gitlab::Application.routes.draw do
)
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 :graphs, only: [:show], constraints: { id: /(?:[^.]|\.(?!json$))+/, format: /json/ } do
member do