diff options
Diffstat (limited to 'config/routes.rb')
-rw-r--r-- | config/routes.rb | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/config/routes.rb b/config/routes.rb index e65ef30afb7..03b4a32a9dd 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -198,7 +198,10 @@ Gitlab::Application.routes.draw do end get 'u/:username/calendar' => 'users#calendar', as: :user_calendar, - constraints: { username: /(?:[^.]|\.(?!atom$))+/, format: /atom/ } + constraints: { username: /.*/ } + + get 'u/:username/calendar_activities' => 'users#calendar_activities', as: :user_calendar_activities, + constraints: { username: /.*/ } get '/u/:username' => 'users#show', as: :user, constraints: { username: /(?:[^.]|\.(?!atom$))+/, format: /atom/ } @@ -239,7 +242,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 @@ -315,14 +318,6 @@ Gitlab::Application.routes.draw do as: :tree ) end - resource :avatar, only: [:show, :destroy] - - resources :commit, only: [:show], constraints: { id: /[[:alnum:]]{6,40}/ } do - get :branches, on: :member - end - - resources :commits, only: [:show], constraints: { id: /(?:[^.]|\.(?!atom$))+/, format: /atom/ } - resources :compare, only: [:index, :create] scope do get( @@ -333,8 +328,24 @@ Gitlab::Application.routes.draw do ) end - resources :network, only: [:show], constraints: { id: /(?:[^.]|\.(?!json$))+/, format: /json/ } - resources :graphs, only: [:show], constraints: { id: /(?:[^.]|\.(?!json$))+/, format: /json/ } do + scope do + get( + '/commits/*id', + to: 'commits#show', + constraints: { id: /(?:[^.]|\.(?!atom$))+/, format: /atom/ }, + as: :commits + ) + end + + resource :avatar, only: [:show, :destroy] + resources :commit, only: [:show], constraints: { id: /[[:alnum:]]{6,40}/ } do + get :branches, on: :member + end + + resources :compare, only: [:index, :create] + resources :network, only: [:show], constraints: { id: /(?:[^.]|\.(?!json$))+/, format: /json/ } + + resources :graphs, only: [:show], constraints: { id: /(?:[^.]|\.(?!json$))+/, format: /json/ } do member do get :commits end |