From: Shaun McDonald Date: Mon, 20 Oct 2008 20:40:06 +0000 (+0000) Subject: Making the capabilities api version indipendent X-Git-Tag: live~7625^2~253 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/6889ee7564f2d795bf05fd9f3a9676632fd953a0 Making the capabilities api version indipendent --- diff --git a/config/routes.rb b/config/routes.rb index 5b2ca38b9..e49cdf74e 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,6 +1,8 @@ ActionController::Routing::Routes.draw do |map| # API + map.connect "api/capabilities", :controller => 'api', :action => 'capabilities' + 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', :id => /\d+/ @@ -25,9 +27,6 @@ ActionController::Routing::Routes.draw do |map| map.connect "api/#{API_VERSION}/way/:id", :controller => 'way', :action => 'delete', :id => /\d+/, :conditions => { :method => :delete } map.connect "api/#{API_VERSION}/ways", :controller => 'way', :action => 'ways', :id => nil - # FIXME Wouldn't capabilites be better placed somewhere else in this file - # and without the #{API_VERSION}, so that clients can always find it? - map.connect "api/#{API_VERSION}/capabilities", :controller => 'api', :action => 'capabilities' map.connect "api/#{API_VERSION}/relation/create", :controller => 'relation', :action => 'create' map.connect "api/#{API_VERSION}/relation/:id/relations", :controller => 'relation', :action => 'relations_for_relation', :id => /\d+/ map.connect "api/#{API_VERSION}/relation/:id/history", :controller => 'old_relation', :action => 'history', :id => /\d+/