Create node version redaction resource
This commit is contained in:
parent
84c4ed3fa8
commit
984dd624dd
5 changed files with 187 additions and 131 deletions
|
@ -30,8 +30,6 @@ OpenStreetMap::Application.routes.draw do
|
|||
post "changeset/comment/:id/hide" => "changeset_comments#destroy", :as => :changeset_comment_hide, :id => /\d+/
|
||||
post "changeset/comment/:id/unhide" => "changeset_comments#restore", :as => :changeset_comment_unhide, :id => /\d+/
|
||||
|
||||
post "node/:node_id/:version/redact" => "old_nodes#redact", :as => :node_version_redact, :version => /\d+/, :node_id => /\d+/
|
||||
|
||||
post "way/:way_id/:version/redact" => "old_ways#redact", :as => :way_version_redact, :version => /\d+/, :id => /\d+/
|
||||
|
||||
post "relation/:relation_id/:version/redact" => "old_relations#redact", :as => :relation_version_redact, :version => /\d+/, :id => /\d+/
|
||||
|
@ -47,9 +45,12 @@ OpenStreetMap::Application.routes.draw do
|
|||
resources :relations, :only => :index
|
||||
end
|
||||
resources :versions, :path => "history", :controller => :old_nodes, :only => :index
|
||||
resources :versions, :path => "", :version => /\d+/, :param => :version, :controller => :old_nodes, :only => :show
|
||||
resource :version, :path => ":version", :version => /\d+/, :controller => :old_nodes, :only => :show do
|
||||
resource :redaction, :module => :old_nodes, :only => [:create, :destroy]
|
||||
end
|
||||
end
|
||||
put "node/create" => "nodes#create", :as => nil
|
||||
post "node/:node_id/:version/redact" => "old_nodes/redactions#create", :node_id => /\d+/, :version => /\d+/, :allow_delete => true, :as => nil
|
||||
|
||||
resources :ways, :only => [:index, :create]
|
||||
resources :ways, :path => "way", :id => /\d+/, :only => [:show, :update, :destroy] do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue