]> git.openstreetmap.org Git - rails.git/blobdiff - config/routes.rb
Fix some bugs found by the note controller tests
[rails.git] / config / routes.rb
index 89f7e1951391826e2864b8a18d0593e33bdb90e0..0c090ef3c997efdc8927d293475243dc900ad9db 100644 (file)
@@ -70,11 +70,25 @@ OpenStreetMap::Application.routes.draw do
   match 'api/0.6/gpx/:id/data.:format' => 'trace#api_data'
   
   # AMF (ActionScript) API
-
   match 'api/0.6/amf/read' => 'amf#amf_read'
   match 'api/0.6/amf/write' => 'amf#amf_write'
   match 'api/0.6/swf/trackpoints' => 'swf#trackpoints'
 
+  # Map notes API
+  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+/, :format => :xml
+  match 'api/0.6/note/:id' => 'note#delete', :via => :delete, :id => /\d+/
+  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', :format => :rss
+
   # Data browsing
   match '/browse/start' => 'browse#start'
   match '/browse/way/:id' => 'browse#way', :id => /\d+/
@@ -90,6 +104,8 @@ OpenStreetMap::Application.routes.draw do
   match '/browse/nearby' => 'changeset#list', :nearby => true
   match '/browse/changesets' => 'changeset#list'
   match '/browse/changesets/feed' => 'changeset#feed', :format => :atom
+  match '/browse/note/:id' => 'browse#note', :id => /\d+/
+  match '/user/:display_name/notes' => 'note#mine'
   match '/browse' => 'changeset#list'
 
   # web site