Sha256: 40406b1523a6ca3de50856c8304a4a7e1b7a704fbdd9f1bb5a2a67d7d62a1162

Contents?: true

Size: 1.91 KB

Versions: 14

Compression:

Stored size: 1.91 KB

Contents

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

Scrivito::SdkEngine.routes.draw do
  get 'scrivito', to: 'scrivito/ui#index'
  get 'scrivito/*application_path', to: 'scrivito/ui#index', format: false

  scope '__scrivito', module: 'scrivito' do
    get ':id', to: 'cms_dispatch#index', as: :base_id, constraints: {id: /\h{16}/}

    resources :objs, controller: '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 :binary_no_cache

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

    resources :tasks, controller: 'tasks', only: [:show], defaults: {format: :json}
    resources :sessions, controller: 'sessions', only: [:update], defaults: {format: :json}

    get 'obj_class/:obj_class_name/defaults', to: 'obj_class#defaults'
    put 'resolve_paths' => 'resolve_paths#resolve', defaults: {format: :json}

    resources :workspaces,
      controller: 'workspaces',
      only: [:index, :show],
      defaults: {format: :json} do
        member do
          put :publish_approval
          get :check
        end
      end

    get 'users/suggest' => 'users#suggest', defaults: {format: :json}
    get 'suggest_completion' => 'completion#suggest', defaults: {format: :json}

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

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

    get 'to_binary' => 'binary_redirect#to_binary', as: :binary
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
scrivito_sdk-1.5.5 config/precedence_routes.rb
scrivito_sdk-1.5.5.rc1 config/precedence_routes.rb
scrivito_sdk-1.5.4 config/precedence_routes.rb
scrivito_sdk-1.5.4.rc1 config/precedence_routes.rb
scrivito_sdk-1.5.3 config/precedence_routes.rb
scrivito_sdk-1.5.3.rc1 config/precedence_routes.rb
scrivito_sdk-1.5.2 config/precedence_routes.rb
scrivito_sdk-1.5.2.rc1 config/precedence_routes.rb
scrivito_sdk-1.5.1 config/precedence_routes.rb
scrivito_sdk-1.5.1.rc2 config/precedence_routes.rb
scrivito_sdk-1.5.1.rc1 config/precedence_routes.rb
scrivito_sdk-1.5.0 config/precedence_routes.rb
scrivito_sdk-1.5.0.rc2 config/precedence_routes.rb
scrivito_sdk-1.5.0.rc1 config/precedence_routes.rb