Commit 7658f8c151b22680cf594d028e180a8a859fc9b8
Committed by
Dmitriy Zaporozhets
1 parent
7534154b
Exists in
master
and in
4 other branches
update routes
Showing
1 changed file
with
24 additions
and
20 deletions
Show diff stats
config/routes.rb
@@ -56,6 +56,7 @@ Gitlab::Application.routes.draw do | @@ -56,6 +56,7 @@ Gitlab::Application.routes.draw do | ||
56 | put :unblock | 56 | put :unblock |
57 | end | 57 | end |
58 | end | 58 | end |
59 | + | ||
59 | resources :groups, constraints: { id: /[^\/]+/ } do | 60 | resources :groups, constraints: { id: /[^\/]+/ } do |
60 | member do | 61 | member do |
61 | put :project_update | 62 | put :project_update |
@@ -63,26 +64,31 @@ Gitlab::Application.routes.draw do | @@ -63,26 +64,31 @@ Gitlab::Application.routes.draw do | ||
63 | delete :remove_project | 64 | delete :remove_project |
64 | end | 65 | end |
65 | end | 66 | end |
66 | - resources :projects, constraints: { id: /[a-zA-Z.\/0-9_\-]+/ }, except: [:new, :create] do | ||
67 | - member do | ||
68 | - get :team | ||
69 | - put :team_update | ||
70 | - end | ||
71 | - scope module: :projects do | ||
72 | - resources :members, only: [:edit, :update, :destroy] | ||
73 | - end | ||
74 | - end | ||
75 | - resources :teams do #, constraints: { id: /[^\/]+/ } do end | 67 | + |
68 | + resources :teams, constraints: { id: /[^\/]+/ } do | ||
76 | scope module: :teams do | 69 | scope module: :teams do |
77 | - resources :members, only: [:edit, :update, :destroy, :new, :create] | ||
78 | - resources :projects, only: [:edit, :update, :destroy, :new, :create] | 70 | + resources :members, only: [:edit, :update, :destroy, :new, :create] |
71 | + resources :projects, only: [:edit, :update, :destroy, :new, :create], constraints: { id: /[a-zA-Z.\/0-9_\-]+/ } | ||
79 | end | 72 | end |
80 | end | 73 | end |
74 | + | ||
81 | resources :hooks, only: [:index, :create, :destroy] do | 75 | resources :hooks, only: [:index, :create, :destroy] do |
82 | get :test | 76 | get :test |
83 | end | 77 | end |
78 | + | ||
84 | resource :logs, only: [:show] | 79 | resource :logs, only: [:show] |
85 | resource :resque, controller: 'resque', only: [:show] | 80 | resource :resque, controller: 'resque', only: [:show] |
81 | + | ||
82 | + resources :projects, constraints: { id: /[a-zA-Z.\/0-9_\-]+/ }, except: [:new, :create] do | ||
83 | + member do | ||
84 | + get :team | ||
85 | + put :team_update | ||
86 | + end | ||
87 | + scope module: :projects, constraints: { id: /[^\/]+/ } do | ||
88 | + resources :members, only: [:edit, :update, :destroy] | ||
89 | + end | ||
90 | + end | ||
91 | + | ||
86 | root to: "dashboard#index" | 92 | root to: "dashboard#index" |
87 | end | 93 | end |
88 | 94 | ||
@@ -116,7 +122,6 @@ Gitlab::Application.routes.draw do | @@ -116,7 +122,6 @@ Gitlab::Application.routes.draw do | ||
116 | get "dashboard/issues" => "dashboard#issues" | 122 | get "dashboard/issues" => "dashboard#issues" |
117 | get "dashboard/merge_requests" => "dashboard#merge_requests" | 123 | get "dashboard/merge_requests" => "dashboard#merge_requests" |
118 | 124 | ||
119 | - | ||
120 | # | 125 | # |
121 | # Groups Area | 126 | # Groups Area |
122 | # | 127 | # |
@@ -130,19 +135,18 @@ Gitlab::Application.routes.draw do | @@ -130,19 +135,18 @@ Gitlab::Application.routes.draw do | ||
130 | end | 135 | end |
131 | end | 136 | end |
132 | 137 | ||
133 | - resources :teams do | 138 | + # |
139 | + # Teams Area | ||
140 | + # | ||
141 | + resources :teams, constraints: { id: /[^\/]+/ } do | ||
134 | member do | 142 | member do |
135 | get :issues | 143 | get :issues |
136 | get :merge_requests | 144 | get :merge_requests |
137 | get :search | 145 | get :search |
138 | - post :delegate_projects | ||
139 | - delete :relegate_project | ||
140 | - put :update_access | ||
141 | end | 146 | end |
142 | scope module: :teams do | 147 | scope module: :teams do |
143 | - resources :members | ||
144 | - resources :projects, only: [:index, :show] do | ||
145 | - end | 148 | + resources :members, only: [:index, :new, :create, :edit, :update, :destroy] |
149 | + resources :projects, only: [:index, :new, :create, :edit, :update, :destroy], constraints: { id: /[a-zA-Z.0-9_\-\/]+/ } | ||
146 | end | 150 | end |
147 | collection do | 151 | collection do |
148 | get :search | 152 | get :search |