official_module/config/routes.rb

30 lines
1.2 KiB
Ruby

Rails.application.routes.draw do
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'
post "/xhr/check_server_ability" => 'client_sites#check_server_ability'
locales = Site.first.in_use_locales rescue I18n.available_locales
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
namespace :admin do
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"
end
end
end
end