2016-11-07 08:34:25 -05:00
|
|
|
resources :groups, only: [:index, :new, :create]
|
2016-09-19 15:49:08 -04:00
|
|
|
|
2016-11-14 09:55:31 -05:00
|
|
|
scope(path: 'groups/*group_id',
|
2016-11-21 05:41:44 -05:00
|
|
|
module: :groups,
|
|
|
|
as: :group,
|
|
|
|
constraints: { group_id: Gitlab::Regex.namespace_route_regex }) do
|
2016-11-07 08:34:25 -05:00
|
|
|
resources :group_members, only: [:index, :create, :update, :destroy], concerns: :access_requestable do
|
|
|
|
post :resend_invite, on: :member
|
|
|
|
delete :leave, on: :collection
|
2016-10-05 08:21:27 -04:00
|
|
|
end
|
2016-11-07 08:34:25 -05:00
|
|
|
|
|
|
|
resource :avatar, only: [:destroy]
|
|
|
|
resources :milestones, constraints: { id: /[^\/]+/ }, only: [:index, :show, :update, :new, :create]
|
2016-11-14 17:42:44 -05:00
|
|
|
|
2016-12-06 11:50:48 -05:00
|
|
|
resources :labels, except: [:show] do
|
2016-11-14 17:42:44 -05:00
|
|
|
post :toggle_subscription, on: :member
|
|
|
|
end
|
2016-10-05 08:21:27 -04:00
|
|
|
end
|
2016-11-07 08:34:25 -05:00
|
|
|
|
2016-12-06 11:50:48 -05:00
|
|
|
scope(path: 'groups/*id',
|
|
|
|
controller: :groups,
|
2017-01-24 08:40:01 -05:00
|
|
|
constraints: { id: Gitlab::Regex.namespace_route_regex, format: /(html|json|atom)/ }) do
|
2016-12-06 11:50:48 -05:00
|
|
|
get :edit, as: :edit_group
|
|
|
|
get :issues, as: :issues_group
|
|
|
|
get :merge_requests, as: :merge_requests_group
|
|
|
|
get :projects, as: :projects_group
|
|
|
|
get :activity, as: :activity_group
|
2017-01-24 10:32:34 -05:00
|
|
|
get :subgroups, as: :subgroups_group
|
2017-01-24 08:40:01 -05:00
|
|
|
get '/', action: :show, as: :group_canonical
|
2016-12-06 11:50:48 -05:00
|
|
|
end
|