Sha256: 4f175a3f8ff4653e5d2474ac74d372402c382ec07705f8f35c903facc4207ab0

Contents?: true

Size: 951 Bytes

Versions: 3

Compression:

Stored size: 951 Bytes

Contents

require 'sidekiq/web'
Sidekiq::Web.set :session_secret, Rails.application.secrets[:secret_key_base]

Cas::Engine.routes.draw do
  mount Shrine.presign_endpoint(:cache) => "/files/cache/presign"

  authenticate :user, ->(u){ u.roles.include?('admin') } do
    mount Sidekiq::Web => '/sidekiq'
  end

  devise_for :users,
    class_name: "Cas::User",
    module: :devise,
    controllers: { sessions: "cas/devise/sessions" },
    skip: :registrations

  resources :sites, only: [:index] do
    resources :users, controller: 'sites/users'

    resources :sections, only: [:index], controller: 'sites/sections' do
      resources :contents, controller: 'sites/sections/contents'
      resources :categories, controller: 'sites/sections/categories'
    end
  end

  # used by tinymce editor
  resources :file_uploads, only: :create
  namespace :api, module: "api" do
    resources :files, only: [:create, :destroy]
  end

  root 'sites/sections#index'
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cas-cms-0.1.3 config/routes.rb
cas-cms-0.1.2 config/routes.rb
cas-cms-0.1.1 config/routes.rb