]> git.openstreetmap.org Git - rails.git/blobdiff - config/routes.rb
fixed a mixup (not really broken, but producing decieving http traffic and logs)
[rails.git] / config / routes.rb
index e95ec1e76ac6df871fabec77f5f9764ac5d9347d..681149c2a30f6e82ff2b3e85ef527bbea5712e05 100644 (file)
@@ -2,7 +2,8 @@ ActionController::Routing::Routes.draw do |map|
 
   # API
   map.connect "api/capabilities", :controller => 'api', :action => 'capabilities'
-  
+  map.connect "api/#{API_VERSION}/capabilities", :controller => 'api', :action => 'capabilities'
+
   map.connect "api/#{API_VERSION}/changeset/create", :controller => 'changeset', :action => 'create'
   map.connect "api/#{API_VERSION}/changeset/:id/upload", :controller => 'changeset', :action => 'upload', :id => /\d+/
   map.connect "api/#{API_VERSION}/changeset/:id/download", :controller => 'changeset', :action => 'download', :id => /\d+/
@@ -84,6 +85,7 @@ ActionController::Routing::Routes.draw do |map|
   map.connect '/browse/changesets', :controller => 'changeset', :action => 'list'
   
   # web site
+  map.root :controller => 'site', :action => 'index'
   map.connect '/', :controller => 'site', :action => 'index'
   map.connect '/edit', :controller => 'site', :action => 'edit'
   map.connect '/history', :controller => 'changeset', :action => 'list_bbox'
@@ -91,6 +93,7 @@ ActionController::Routing::Routes.draw do |map|
   map.connect '/login', :controller => 'user', :action => 'login'
   map.connect '/logout', :controller => 'user', :action => 'logout'
   map.connect '/offline', :controller => 'site', :action => 'offline'
+  map.connect '/key', :controller => 'site', :action => 'key'
   map.connect '/user/new', :controller => 'user', :action => 'new'
   map.connect '/user/save', :controller => 'user', :action => 'save'
   map.connect '/user/confirm', :controller => 'user', :action => 'confirm'
@@ -111,6 +114,9 @@ ActionController::Routing::Routes.draw do |map|
   map.connect '/create-account.html', :controller => 'user', :action => 'new'
   map.connect '/forgot-password.html', :controller => 'user', :action => 'lost_password'
 
+  # permalink
+  map.connect '/go/:code', :controller => 'site', :action => 'permalink', :code => /[a-zA-Z0-9_@]+[=-]*/
+
   # traces  
   map.connect '/traces', :controller => 'trace', :action => 'list'
   map.connect '/traces/page/:page', :controller => 'trace', :action => 'list'
@@ -163,7 +169,15 @@ ActionController::Routing::Routes.draw do |map|
 
   # geocoder
   map.connect '/geocoder/search', :controller => 'geocoder', :action => 'search'
+  map.connect '/geocoder/search_latlon', :controller => 'geocoder', :action => 'search_latlon'
+  map.connect '/geocoder/search_us_postcode', :controller => 'geocoder', :action => 'search_us_postcode'
+  map.connect '/geocoder/search_uk_postcode', :controller => 'geocoder', :action => 'search_uk_postcode'
+  map.connect '/geocoder/search_ca_postcode', :controller => 'geocoder', :action => 'search_ca_postcode'
+  map.connect '/geocoder/search_osm_namefinder', :controller => 'geocoder', :action => 'search_osm_namefinder'
+  map.connect '/geocoder/search_geonames', :controller => 'geocoder', :action => 'search_geonames'
   map.connect '/geocoder/description', :controller => 'geocoder', :action => 'description'
+  map.connect '/geocoder/description_osm_namefinder', :controller => 'geocoder', :action => 'description_osm_namefinder'
+  map.connect '/geocoder/description_geonames', :controller => 'geocoder', :action => 'description_geonames'
 
   # export
   map.connect '/export/start', :controller => 'export', :action => 'start'
@@ -173,7 +187,7 @@ ActionController::Routing::Routes.draw do |map|
 
   map.connect '/user/:display_name/inbox', :controller => 'message', :action => 'inbox'
   map.connect '/user/:display_name/outbox', :controller => 'message', :action => 'outbox'
-  map.connect '/message/new/:user_id', :controller => 'message', :action => 'new'
+  map.connect '/message/new/:display_name', :controller => 'message', :action => 'new'
   map.connect '/message/read/:message_id', :controller => 'message', :action => 'read'
   map.connect '/message/mark/:message_id', :controller => 'message', :action => 'mark'
   map.connect '/message/reply/:message_id', :controller => 'message', :action => 'reply'