Merge the gpx_bugs action into the main get_bugs action

This commit is contained in:
Tom Hughes 2011-05-07 17:21:38 +01:00
parent cc311ff301
commit 6aec21b5b8
2 changed files with 2 additions and 8 deletions

View file

@ -127,7 +127,6 @@ class MapBugsController < ApplicationController
render_ok
end
def rss
# Figure out the bbox
bbox = params['bbox']
@ -145,18 +144,13 @@ class MapBugsController < ApplicationController
limit = getLimit
conditions = closedCondition
conditions = cond_merge conditions, [OSM.sql_for_area_no_quadtile(@min_lat, @min_lon, @max_lat, @max_lon)]
check_boundaries(@min_lon, @min_lat, @max_lon, @max_lat, :false)
@comments = MapBugComment.find(:all, :limit => limit, :order => "date_created DESC", :joins => :map_bug, :include => :map_bug, :conditions => conditions)
render :template => 'map_bugs/rss.rss'
end
def gpx_bugs
request.format = :xml
get_bugs
end
def read
@bug = MapBug.find(params['id'])
raise OSM::APINotFoundError unless @bug

View file

@ -80,7 +80,7 @@ ActionController::Routing::Routes.draw do |map|
map.connect "api/#{API_VERSION}/bugs/addPOIexec", :controller => 'map_bugs', :action => 'add_bug'
map.connect "api/#{API_VERSION}/bugs/closePOIexec", :controller => 'map_bugs', :action => 'close_bug'
map.connect "api/#{API_VERSION}/bugs/editPOIexec", :controller => 'map_bugs', :action => 'edit_bug'
map.connect "api/#{API_VERSION}/bugs/getGPX", :controller => 'map_bugs', :action => 'gpx_bugs'
map.connect "api/#{API_VERSION}/bugs/getGPX", :controller => 'map_bugs', :action => 'get_bugs', :format => :gpx
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'