personal_plugin_generator/config/routes.rb

20 lines
1.0 KiB
Ruby
Raw Normal View History

2021-02-27 04:19:24 +00:00
Rails.application.routes.draw do
locales = Site.find_by(site_active: true).in_use_locales rescue I18n.available_locales
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
namespace :admin do
resources :personal_plugin_fields do
get 'fields_setting' , to: 'personal_plugin_fields#fields_setting'
post 'update_fields_setting' , to: 'personal_plugin_fields#update_fields_setting'
patch 'update_fields_setting' , to: 'personal_plugin_fields#update_fields_setting'
get 'generate_plugin' , to: 'personal_plugin_fields#generate_plugin'
2021-03-03 12:24:10 +00:00
get 'copy' , to: 'personal_plugin_fields#copy'
2021-03-04 09:38:15 +00:00
get 'download' , to: 'personal_plugin_fields#download'
2021-02-27 04:19:24 +00:00
end
2021-03-03 12:24:10 +00:00
resource :personal_plugin_field do
post 'check_plugin_exist' ,to: 'personal_plugin_fields#check_plugin_exist'
post 'check_modal_name' ,to: 'personal_plugin_fields#check_modal_name'
2021-03-03 12:24:10 +00:00
end
end
2021-02-27 04:19:24 +00:00
end
end