Make api create way path resourceful

This commit is contained in:
Anton Khorev 2025-02-01 13:25:23 +03:00
parent 96671cf0c0
commit 2ad75d72af
2 changed files with 23 additions and 18 deletions

View file

@ -39,7 +39,6 @@ OpenStreetMap::Application.routes.draw do
put "node/:id" => "nodes#update", :id => /\d+/
delete "node/:id" => "nodes#delete", :id => /\d+/
put "way/create" => "ways#create"
get "way/:id/history" => "old_ways#history", :as => :api_way_history, :id => /\d+/
get "way/:id/full" => "ways#full", :as => :way_full, :id => /\d+/
get "way/:id/relations" => "relations#relations_for_way", :as => :way_relations, :id => /\d+/
@ -64,7 +63,8 @@ OpenStreetMap::Application.routes.draw do
resources :nodes, :only => [:index, :create]
put "node/create" => "nodes#create", :as => nil
resources :ways, :only => :index
resources :ways, :only => [:index, :create]
put "way/create" => "ways#create", :as => nil
resources :relations, :only => :index