mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 13:06:56 +08:00
match is old school (cc @EvilTrout)
This commit is contained in:
@ -165,14 +165,14 @@ Discourse::Application.routes.draw do
|
|||||||
|
|
||||||
# They have periods in their URLs often:
|
# They have periods in their URLs often:
|
||||||
get 'site_texts' => 'site_texts#index'
|
get 'site_texts' => 'site_texts#index'
|
||||||
match 'site_texts/(:id)' => 'site_texts#show', :constraints => { :id => /[0-9a-zA-Z\_\.\-]+/ }, via: :get
|
get 'site_texts/(:id)' => 'site_texts#show', constraints: { id: /[\w.\-]+/i }
|
||||||
match 'site_texts/(:id)' => 'site_texts#update', :constraints => { :id => /[0-9a-zA-Z\_\.\-]+/ }, via: :put
|
put 'site_texts/(:id)' => 'site_texts#update', constraints: { id: /[\w.\-]+/i }
|
||||||
match 'site_texts/(:id)' => 'site_texts#revert', :constraints => { :id => /[0-9a-zA-Z\_\.\-]+/ }, via: :delete
|
delete 'site_texts/(:id)' => 'site_texts#revert', constraints: { id: /[\w.\-]+/i }
|
||||||
|
|
||||||
get 'email_templates' => 'email_templates#index'
|
get 'email_templates' => 'email_templates#index'
|
||||||
match 'email_templates/(:id)' => 'email_templates#show', :constraints => { :id => /[0-9a-z\_\.]+/ }, via: :get
|
get 'email_templates/(:id)' => 'email_templates#show', constraints: { id: /[0-9a-z_.]+/ }
|
||||||
match 'email_templates/(:id)' => 'email_templates#update', :constraints => { :id => /[0-9a-z\_\.]+/ }, via: :put
|
put 'email_templates/(:id)' => 'email_templates#update', constraints: { id: /[0-9a-z_.]+/ }
|
||||||
match 'email_templates/(:id)' => 'email_templates#revert', :constraints => { :id => /[0-9a-z\_\.]+/ }, via: :delete
|
delete 'email_templates/(:id)' => 'email_templates#revert', constraints: { id: /[0-9a-z_.]+/ }
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :embeddable_hosts, constraints: AdminConstraint.new
|
resources :embeddable_hosts, constraints: AdminConstraint.new
|
||||||
|
Reference in New Issue
Block a user