]> git.openstreetmap.org Git - rails.git/blobdiff - config/routes.rb
Add support for segment/:id/ways and node/:id/segments API calls. Fixes #452.
[rails.git] / config / routes.rb
index bc7f08b5b1e189f80dcfbda69d2b47ea4a9a363e..67943d2b504d135110adf5e7980f69a6b8ad62b4 100644 (file)
@@ -2,11 +2,13 @@ ActionController::Routing::Routes.draw do |map|
 
   # API
   map.connect "api/#{API_VERSION}/node/create", :controller => 'node', :action => 'create'
+  map.connect "api/#{API_VERSION}/node/:id/segments", :controller => 'segment', :action => 'segments_for_node'
   map.connect "api/#{API_VERSION}/node/:id/history", :controller => 'old_node', :action => 'history', :id => nil
   map.connect "api/#{API_VERSION}/node/:id", :controller => 'node', :action => 'rest', :id => nil 
   map.connect "api/#{API_VERSION}/nodes", :controller => 'node', :action => 'nodes', :id => nil
   
   map.connect "api/#{API_VERSION}/segment/create", :controller => 'segment', :action => 'create'
+  map.connect "api/#{API_VERSION}/segment/:id/ways", :controller => 'way', :action => 'ways_for_segment'
   map.connect "api/#{API_VERSION}/segment/:id/history", :controller => 'old_segment', :action => 'history'
   map.connect "api/#{API_VERSION}/segment/:id", :controller => 'segment', :action => 'rest'
   map.connect "api/#{API_VERSION}/segments", :controller => 'segment', :action => 'segments', :id => nil