2016-10-06 08:14:24 -04:00
|
|
|
require 'constraints/group_url_constrainer'
|
|
|
|
|
|
|
|
constraints(GroupUrlConstrainer.new) do
|
2016-10-16 05:49:23 -04:00
|
|
|
scope(path: ':id',
|
|
|
|
as: :group,
|
|
|
|
constraints: { id: /[a-zA-Z.0-9_\-]+(?<!\.atom)/ },
|
|
|
|
controller: :groups) do
|
2016-10-06 08:14:24 -04:00
|
|
|
get '/', action: :show
|
2016-10-14 02:38:50 -04:00
|
|
|
patch '/', action: :update
|
|
|
|
put '/', action: :update
|
|
|
|
delete '/', action: :destroy
|
2016-10-06 08:14:24 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-10-05 08:21:27 -04:00
|
|
|
resources :groups, constraints: { id: /[a-zA-Z.0-9_\-]+(?<!\.atom)/ } do
|
|
|
|
member do
|
|
|
|
get :issues
|
|
|
|
get :merge_requests
|
|
|
|
get :projects
|
|
|
|
get :activity
|
|
|
|
end
|
|
|
|
|
|
|
|
scope module: :groups do
|
|
|
|
resources :group_members, only: [:index, :create, :update, :destroy], concerns: :access_requestable do
|
|
|
|
post :resend_invite, on: :member
|
|
|
|
delete :leave, on: :collection
|
|
|
|
end
|
|
|
|
|
|
|
|
resource :avatar, only: [:destroy]
|
|
|
|
resources :milestones, constraints: { id: /[^\/]+/ }, only: [:index, :show, :update, :new, :create]
|
|
|
|
end
|
|
|
|
end
|