Rails.application.routes.draw do mount Fiona7::Engine, at: '/', as: :fiona7_engine mount Scrivito::SdkEngine, at: '/', as: :scrivito_engine end Fiona7::Engine.routes.draw do match '/_f7/tenants/:name/perform', to: 'fiona7/api#perform', via: [:post, :put] get '/_b/:id(/:name)' => 'fiona7/blobs#show', as: :fiona7_blob match '/_b/:id(/:name)' => 'fiona7/blobs#query', as: :fiona7_blob_meta, via: [:head] post '/_f7/login', to: 'fiona7/sessions#create', as: :fiona7_login delete '/_f7/logout', to: 'fiona7/sessions#destroy', as: :fiona7_logout put '/__scrivito/objs/release(.:format)', to: 'fiona7/release#release', as: :fiona7_release put '/__scrivito/objs/workflow/edit(.:format)', to: 'fiona7/workflow#edit', as: :fiona7_workflow_edit put '/__scrivito/objs/workflow/take(.:format)', to: 'fiona7/workflow#take', as: :fiona7_workflow_take put '/__scrivito/objs/workflow/forward(.:format)', to: 'fiona7/workflow#forward', as: :fiona7_workflow_forward put '/__scrivito/objs/workflow/commit(.:format)', to: 'fiona7/workflow#commit', as: :fiona7_workflow_commit put '/__scrivito/objs/workflow/sign(.:format)', to: 'fiona7/workflow#sign', as: :fiona7_workflow_sign put '/__scrivito/objs/workflow/reject(.:format)', to: 'fiona7/workflow#reject', as: :fiona7_workflow_reject get '/__scrivito/objs/:id/release/preview(.:format)', to: 'fiona7/release#preview', as: :fiona7_release_preview 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: /\d+/} # <-- patch here 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