Make api show/update/destroy relation actions resourceful
This commit is contained in:
parent
35fc840b41
commit
18f65b78eb
4 changed files with 10 additions and 13 deletions
|
@ -47,9 +47,6 @@ OpenStreetMap::Application.routes.draw do
|
|||
get "relation/:id/full" => "relations#full", :as => :relation_full, :id => /\d+/
|
||||
post "relation/:id/:version/redact" => "old_relations#redact", :as => :relation_version_redact, :version => /\d+/, :id => /\d+/
|
||||
get "relation/:id/:version" => "old_relations#show", :as => :api_old_relation, :id => /\d+/, :version => /\d+/
|
||||
get "relation/:id" => "relations#show", :as => :api_relation, :id => /\d+/
|
||||
put "relation/:id" => "relations#update", :id => /\d+/
|
||||
delete "relation/:id" => "relations#delete", :id => /\d+/
|
||||
end
|
||||
|
||||
namespace :api, :path => "api/0.6" do
|
||||
|
@ -62,6 +59,7 @@ OpenStreetMap::Application.routes.draw do
|
|||
put "way/create" => "ways#create", :as => nil
|
||||
|
||||
resources :relations, :only => [:index, :create]
|
||||
resources :relations, :path => "relation", :id => /\d+/, :only => [:show, :update, :destroy]
|
||||
put "relation/create" => "relations#create", :as => nil
|
||||
|
||||
resource :map, :only => :show
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue