From: Tom Hughes Date: Fri, 9 Mar 2012 00:41:15 +0000 (+0000) Subject: Remove redundant routes and add default format specifiers X-Git-Tag: live~5187^2~113 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/fbf23107219bc0c0a24e9ce403bdeecb40690346 Remove redundant routes and add default format specifiers --- diff --git a/config/routes.rb b/config/routes.rb index fb4fcd426..0c090ef3c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -75,22 +75,19 @@ OpenStreetMap::Application.routes.draw do match 'api/0.6/swf/trackpoints' => 'swf#trackpoints' # Map notes API - match 'api/0.6/notes' => 'note#list' - match 'api/0.6/notes.:format' => 'note#list' - match 'api/0.6/notes/search' => 'note#search' - match 'api/0.6/notes/rss' => 'notes#rss' + match 'api/0.6/notes' => 'note#list', :format => :xml + match 'api/0.6/notes/search' => 'note#search', :format => :xml + match 'api/0.6/notes/rss' => 'note#rss', :format => :rss match 'api/0.6/note/create' => 'note#create' match 'api/0.6/note/:id/comment' => 'note#update', :id => /\d+/ match 'api/0.6/note/:id/close' => 'note#close', :id => /\d+/ - match 'api/0.6/note/:id' => 'note#read', :via => :get, :id => /\d+/ - match 'api/0.6/note/:id.:format' => 'note#read', :via => :get, :id => /\d+/ + match 'api/0.6/note/:id' => 'note#read', :via => :get, :id => /\d+/, :format => :xml match 'api/0.6/note/:id' => 'note#delete', :via => :delete, :id => /\d+/ - match 'api/0.6/notes/getBugs' => 'note#list' match 'api/0.6/notes/addPOIexec' => 'note#create' match 'api/0.6/notes/closePOIexec' => 'note#close' match 'api/0.6/notes/editPOIexec' => 'note#update' match 'api/0.6/notes/getGPX' => 'note#list', :format => :gpx - match 'api/0.6/notes/getRSSfeed' => 'note#rss' + match 'api/0.6/notes/getRSSfeed' => 'note#rss', :format => :rss # Data browsing match '/browse/start' => 'browse#start'