Sha256: 22cdb0345d1313ada70da3d55d7f3b0718937d7814c1c66d33c9b1b37d5c3a9f
Contents?: true
Size: 1.55 KB
Versions: 7
Compression:
Stored size: 1.55 KB
Contents
require 'sidekiq/web' DiscoApp::Engine.routes.draw do get 'ref', to: '/sessions#referral' controller :webhooks do post 'webhooks' => :process_webhook, as: :webhooks end resources :subscriptions, only: [:new, :create] do resources :charges, only: [:new, :create] do member do get 'activate' end end end controller :install do get 'install' => :install, as: :install get 'installing' => :installing, as: :installing get 'uninstalling' => :uninstalling, as: :uninstalling end controller 'admin' do get 'admin', to: redirect('/admin/shops') get 'admin/shops' => 'admin/shops#index' end namespace :admin do resources :shops, only: [:index, :edit, :update] do resources :subscriptions, only: [:edit, :update] end resources :plans resource :app_settings, only: [:edit, :update] # JSON-API resources for admins. namespace :resources do jsonapi_resources :shops end end # Make the Sidekiq Web UI accessible using the same credentials as the admin. if Rails.env.production? Sidekiq::Web.use Rack::Auth::Basic do |username, password| [ ENV['ADMIN_APP_USERNAME'].present?, ENV['ADMIN_APP_USERNAME'] == username, ENV['ADMIN_APP_PASSWORD'].present?, ENV['ADMIN_APP_PASSWORD'] == password, ].all? end mount Sidekiq::Web, at: '/sidekiq' end # Make the embedded app frame emulator available in development. if Rails.env.development? controller :frame do get 'frame' => :frame, as: :frame end end end
Version data entries
7 entries across 7 versions & 1 rubygems