From 6889ee7564f2d795bf05fd9f3a9676632fd953a0 Mon Sep 17 00:00:00 2001 From: Shaun McDonald Date: Mon, 20 Oct 2008 20:40:06 +0000 Subject: [PATCH] Making the capabilities api version indipendent --- config/routes.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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+/ -- 2.39.5