]> git.openstreetmap.org Git - rails.git/blobdiff - config/routes.rb
try and make the OpenStreetBugs API a bit more consistent with the rest of the API
[rails.git] / config / routes.rb
index cadf3762545d10bbadd881ff969dea2f9d998334..2c57f11ca7ce06504f2b66fdf7ce0d06a27ae0e8 100644 (file)
@@ -79,6 +79,15 @@ ActionController::Routing::Routes.draw do |map|
   map.connect "api/#{API_VERSION}/bugs/getGPX", :controller =>'map_bugs', :action =>'gpx_bugs'
   map.connect "api/#{API_VERSION}/bugs/getRSSfeed", :controller =>'map_bugs', :action =>'rss'
 
+  map.connect "api/#{API_VERSION}/bugs", :controller => 'map_bugs', :action => 'get_bugs'
+  map.connect "api/#{API_VERSION}/bugs/search", :controller => 'map_bugs', :action => 'search'
+  map.connect "api/#{API_VERSION}/bug/create", :controller => 'map_bugs', :action => 'add_bug'
+  map.connect "api/#{API_VERSION}/bug/:id/comment", :controller => 'map_bugs', :action => 'edit_bug', :id => /\d+/
+  map.connect "api/#{API_VERSION}/bug/:id/close", :controller => 'map_bugs', :action => 'close_bug', :id => /\d+/
+  map.connect "api/#{API_VERSION}/bug/:id", :controller => 'map_bugs', :action => 'read', :id => /\d+/, :conditions => { :method => :get }
+  map.connect "api/#{API_VERSION}/bug/:id", :controller => 'map_bugs', :action => 'delete', :id => /\d+/, :conditions => { :method => :delete }
+  
+
   
   # Data browsing
   map.connect '/browse', :controller => 'changeset', :action => 'list'