forked from Gitlink/forgeplus
FIX delete route regx
This commit is contained in:
parent
6a8ae5234b
commit
23a28cd1a9
|
@ -20,8 +20,6 @@ module Educoderplus
|
||||||
# config.educoder = config_for(:configuration)
|
# config.educoder = config_for(:configuration)
|
||||||
|
|
||||||
# Custom directories with classes and modules you want to be autoloadable.
|
# Custom directories with classes and modules you want to be autoloadable.
|
||||||
# config.eager_load_paths << Rails.root.join('lib')
|
|
||||||
config.eager_load_paths += %W(#{config.root}/lib)
|
|
||||||
|
|
||||||
config.active_record.default_timezone = :utc
|
config.active_record.default_timezone = :utc
|
||||||
config.time_zone = 'Beijing'
|
config.time_zone = 'Beijing'
|
||||||
|
|
|
@ -325,20 +325,13 @@ Rails.application.routes.draw do
|
||||||
|
|
||||||
# protected_branches
|
# protected_branches
|
||||||
scope do
|
scope do
|
||||||
# get ':protected_branches/:action/:id/:user_id', constraints: { branch_name: Forgeplus::Regex.git_reference_regex }
|
|
||||||
# post '/protected_branches' => 'protected_branches#create'
|
|
||||||
# delete '/protected_branches/:branch_name' => 'protected_branches#destroy',
|
|
||||||
# constraints: { branch_name: Forgeplus::Regex.git_reference_regex }
|
|
||||||
# patch '/protected_branches/:branch_name' => 'protected_branches#update',
|
|
||||||
# constraints: { branch_name: Forgeplus::Regex.git_reference_regex }
|
|
||||||
get(
|
get(
|
||||||
'/protected_branches/',
|
'/protected_branches/',
|
||||||
to: 'protected_branches#index'
|
to: 'protected_branches#index'
|
||||||
)
|
)
|
||||||
delete(
|
delete(
|
||||||
'/protected_branches/:branch_name',
|
'/protected_branches/:branch_name',
|
||||||
to: 'protected_branches#destroy',
|
to: 'protected_branches#destroy'
|
||||||
constraints: { branch_name: Forgeplus::Regex.git_reference_regex }
|
|
||||||
)
|
)
|
||||||
post(
|
post(
|
||||||
'/protected_branches',
|
'/protected_branches',
|
||||||
|
@ -346,8 +339,7 @@ Rails.application.routes.draw do
|
||||||
)
|
)
|
||||||
patch(
|
patch(
|
||||||
'/protected_branches/:branch_name',
|
'/protected_branches/:branch_name',
|
||||||
to: 'protected_branches#update',
|
to: 'protected_branches#update'
|
||||||
constraints: { branch_name: Forgeplus::Regex.git_reference_regex }
|
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue