-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathroutes.rb
More file actions
46 lines (41 loc) · 2.36 KB
/
Copy pathroutes.rb
File metadata and controls
46 lines (41 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Rails.application.routes.draw do
get "/healthcheck/live", to: proc { [200, {}, %w[OK]] }
get "/healthcheck/ready", to: GovukHealthcheck.rack_response
namespace :admin do
post "preview" => "preview#preview"
end
namespace :content_block_manager, path: "/" do
root to: "content_block/documents#index", via: :get
resources :users, only: %i[show]
namespace :content_block, path: "content-block" do
get "content-id/:content_id", to: "documents#content_id", as: :content_id
resources :documents, only: %i[index show new], path_names: { new: "(:block_type)/new" }, path: "" do
collection do
post :new_document_options_redirect
end
resources :editions, only: %i[new create]
get "schedule/edit", to: "documents/schedule#edit", as: :schedule_edit
put "schedule", to: "documents/schedule#update", as: :update_schedule
patch "schedule", to: "documents/schedule#update"
end
resources :editions, only: %i[new create destroy], path_names: { new: ":block_type/new" } do
member do
resources :workflow, only: %i[show update], controller: "editions/workflow", param: :step do
collection do
get :cancel, to: "editions/workflow#cancel"
end
end
get "embedded-objects/(:object_type)/new", to: "editions/embedded_objects#new", as: :new_embedded_object
post "embedded-objects", to: "editions/embedded_objects#new_embedded_objects_options_redirect", as: :new_embedded_objects_options_redirect
post "embedded-objects/:object_type", to: "editions/embedded_objects#create", as: :create_embedded_object
get "embedded-objects/:object_type/:object_title/edit", to: "editions/embedded_objects#edit", as: :edit_embedded_object
put "embedded-objects/:object_type/:object_title", to: "editions/embedded_objects#update", as: :embedded_object
get "embedded-objects/:object_type/:object_title/review", to: "editions/embedded_objects#review", as: :review_embedded_object
post "embedded-objects/:object_type/:object_title/publish", to: "editions/embedded_objects#publish", as: :publish_embedded_object
get :preview, to: "editions/host_content#preview", path: "host-content/:host_content_id/preview", as: :host_content_preview
end
end
end
end
get "/page" => "pages#show"
end