From: Christopher Schmidt Date: Mon, 12 May 2008 21:12:30 +0000 (+0000) Subject: The ordering of these shouldn't have mattered, but it did, because I didn't put a... X-Git-Tag: live~7609^2~340 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/4a9ee4c7362071dfbaa9e1a59ea1720bc00d5ebb?ds=sidebyside The ordering of these shouldn't have mattered, but it did, because I didn't put a regex filter on my :id, so "upload" was being treated as an ID (which clearly wouldn't work); This fix obviates the need for r7789, sorry about that. --- diff --git a/config/routes.rb b/config/routes.rb index 2c7f4d0fc..5ca4f5a53 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -3,8 +3,8 @@ ActionController::Routing::Routes.draw do |map| # API map.connect "api/#{API_VERSION}/changeset/create", :controller => 'changeset', :action => 'create' map.connect "api/#{API_VERSION}/changeset/upload", :controller => 'changeset', :action => 'upload' - map.connect "api/#{API_VERSION}/changeset/:id", :controller => 'changeset', :action => 'read' - map.connect "api/#{API_VERSION}/changeset/:id/close", :controller => 'changeset', :action => 'close' + map.connect "api/#{API_VERSION}/changeset/:id", :controller => 'changeset', :action => 'read', :id => /\d+/ + map.connect "api/#{API_VERSION}/changeset/:id/close", :controller => 'changeset', :action => 'close', :id =>/\d+/ map.connect "api/#{API_VERSION}/node/create", :controller => 'node', :action => 'create' map.connect "api/#{API_VERSION}/node/:id/ways", :controller => 'way', :action => 'ways_for_node', :id => /\d+/ @@ -59,6 +59,7 @@ ActionController::Routing::Routes.draw do |map| # Potlatch API + map.connect "api/0.5/amf", :controller =>'amf', :action =>'talk' map.connect "api/#{API_VERSION}/amf", :controller =>'amf', :action =>'talk' map.connect "api/#{API_VERSION}/swf/trackpoints", :controller =>'swf', :action =>'trackpoints'