Sha256: 4c23e8bf379727951abead8001f9fc53c72dd4bdf4939185b4c228fd3bf3afd7

Contents?: true

Size: 1.97 KB

Versions: 5

Compression:

Stored size: 1.97 KB

Contents

Rails.application.routes.draw do
  mount Scrivito::SdkEngine, at: '/', as: :scrivito_engine
end

Scrivito::SdkEngine.routes.draw do
  resources :objs, controller: 'scrivito/objs', path: '__scrivito/objs',
      only: [:show, :create, :update, :destroy], defaults: {format: :json} do
    collection do
      get :page_class_selection
      get :search
    end

    member do
      get :widget
      get :widget_class_selection
      get :widget_modification
      get :conflicting_workspaces
      get :is_outdated

      post :copy
      post :duplicate

      put :revert
      put :restore
      put :mark_resolved
      put :destroy_widget
      put :revert_widget
      put :restore_widget
      put :transfer_modifications
    end
  end

  resources :tasks, controller: 'scrivito/tasks', path: '__scrivito/tasks', only: [:show],
    defaults: {format: :json}

  get '__scrivito/blobs/upload_permission' => 'scrivito/blobs#upload_permission',
    defaults: {format: :json}
  put '__scrivito/blobs/activate_upload' => 'scrivito/blobs#activate_upload',
    defaults: {format: :json}

  resources :workspaces,
    controller: 'scrivito/workspaces',
    path: '__scrivito/workspaces',
    only: [:index, :show, :create, :update, :destroy],
    defaults: {format: :json} do
      member do
        put :rebase
        put :publish
        get :check
      end
    end

  get '__scrivito/users/suggest' => 'scrivito/users#suggest', defaults: {format: :json}

  get '__scrivito/render_widget/:id/show_widget/:widget_id' => 'scrivito/cms_dispatch#show_widget'
  get '__scrivito/render_widget/:id/widget_details/:widget_id' => 'scrivito/cms_dispatch#widget_details'

  get '__scrivito/page_details/:id' => 'scrivito/cms_dispatch#page_details'
  get '__scrivito/resource_details/:resource_id', to: 'scrivito/ui#index'

  get '__scrivito/to_binary' => 'scrivito/binary_redirect#to_binary', as: :binary

  get 'scrivito', to: 'scrivito/ui#index'
  get 'scrivito/*application_path', to: 'scrivito/ui#index', format: false
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
scrivito_sdk-0.71.2 config/precedence_routes.rb
scrivito_sdk-0.71.1 config/precedence_routes.rb
scrivito_sdk-0.71.0 config/precedence_routes.rb
scrivito_sdk-0.71.0.rc2 config/precedence_routes.rb
scrivito_sdk-0.71.0.rc1 config/precedence_routes.rb