Sha256: cfc1ad8945ecc3b1fe54f0b3db8fd5a1c9459b21b13074d1c69aa72e3458bf2f

Contents?: true

Size: 767 Bytes

Versions: 7

Compression:

Stored size: 767 Bytes

Contents

# frozen_string_literal: true

Scribo::Engine.routes.draw do
  namespace :admin, path: Scribo.config.admin_mount_point do
    resources :sites do
      resources :contents, controller: 'sites/contents' do
        member do
          put 'rename', as: :rename
        end
        collection do
          post 'upload'
          put 'move', as: :move
        end
      end

      member do
        get 'export'
      end
      collection do
        get 'import'
        post 'import'
      end
    end
  end
  namespace :api do
    resources :sites do
      collection do
        post 'import'
      end
    end
  end

  root to: 'contents#show'
  get '(*path)', to: 'contents#show', as: 'content', constraints: ->(request) { !request.path.starts_with?('/rails') }
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
scribo-1.0.44 config/routes.rb
scribo-1.0.43 config/routes.rb
scribo-1.0.42 config/routes.rb
scribo-1.0.41 config/routes.rb
scribo-1.0.40 config/routes.rb
scribo-1.0.39 config/routes.rb
scribo-1.0.38 config/routes.rb