official_module/config/routes.rb

30 lines
1.2 KiB
Ruby
Raw Permalink Normal View History

2021-07-15 10:01:56 +00:00
Rails.application.routes.draw do
2021-07-15 09:08:06 +00:00
post "/store/check_module_permissions" => "client_sites#check_module_permissions"
post "/store/register_old_sites_modules" => "client_sites#register_old_sites_modules"
get "/store/check_for_rulingcom" => "client_sites#check_for_rulingcom"
get "/store/desktop/widgets" => "client_sites#get_desktop_widget_list"
get "/desktop/widget_download_url" => "client_sites#widget_download_url"
get "/store/form_token" => 'client_sites#get_csrf_token'
2021-07-19 11:52:42 +00:00
post "/xhr/check_server_ability" => 'client_sites#check_server_ability'
2021-07-15 10:59:12 +00:00
locales = Site.first.in_use_locales rescue I18n.available_locales
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
namespace :admin do
2021-07-19 11:52:42 +00:00
scope "sites/:id", :controller => 'official_module',as: :site do
get "set_master_key"
patch "update_master_password"
end
resources :official_module, :controller => 'official_module',:only=>[:index] do
get "set_server_ability"
get "delete"
patch "update_server_ability"
end
scope :official_module, :controller => 'official_module',:only=>[],as: :official_module_new do
get "set_server_ability"
get "delete"
patch "update_server_ability"
2021-07-15 10:59:12 +00:00
end
2021-07-15 09:08:06 +00:00
end
end
end