summaryrefslogtreecommitdiff
path: root/config/routes.rb
diff options
context:
space:
mode:
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 95fbe7dd9df..d52cbb22428 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -30,6 +30,11 @@ Rails.application.routes.draw do
mount LetterOpenerWeb::Engine, at: '/rails/letter_opener'
end
+ concern :access_requestable do
+ post :request_access, on: :collection
+ post :approve_access_request, on: :member
+ end
+
namespace :ci do
# CI API
Ci::API::API.logger Rails.logger
@@ -409,7 +414,7 @@ Rails.application.routes.draw do
end
scope module: :groups do
- resources :group_members, only: [:index, :create, :update, :destroy] do
+ resources :group_members, only: [:index, :create, :update, :destroy], concerns: :access_requestable do
post :resend_invite, on: :member
delete :leave, on: :collection
end
@@ -704,6 +709,8 @@ Rails.application.routes.draw do
end
end
+ resources :environments, only: [:index, :show, :new, :create, :destroy]
+
resources :builds, only: [:index, :show], constraints: { id: /\d+/ } do
collection do
post :cancel_all
@@ -722,6 +729,7 @@ Rails.application.routes.draw do
get :download
get :browse, path: 'browse(/*path)', format: false
get :file, path: 'file/*path', format: false
+ post :keep
end
end
@@ -765,7 +773,7 @@ Rails.application.routes.draw do
end
end
- resources :project_members, except: [:new, :edit], constraints: { id: /[a-zA-Z.\/0-9_\-#%+]+/ } do
+ resources :project_members, except: [:new, :edit], constraints: { id: /[a-zA-Z.\/0-9_\-#%+]+/ }, concerns: :access_requestable do
collection do
delete :leave
@@ -789,6 +797,8 @@ Rails.application.routes.draw do
end
end
+ resources :todos, only: [:create, :update], constraints: { id: /\d+/ }
+
resources :uploads, only: [:create] do
collection do
get ":secret/:filename", action: :show, as: :show, constraints: { filename: /[^\/]+/ }