]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/api_controller.rb
api06: simplify exception handling and add exception handling to the diff
[rails.git] / app / controllers / api_controller.rb
index 26cb93a489cbd1f625b79ea727e0e58b78eccabf..d7937cb01d8db241072e1de2d1b841486fce84b4 100644 (file)
@@ -120,7 +120,7 @@ class ApiController < ApplicationController
       return
     end
     if node_ids.length == 0
-      render :text => "<osm version='0.5'></osm>", :content_type => "text/xml"
+      render :text => "<osm version='#{API_VERSION}'></osm>", :content_type => "text/xml"
       return
     end
 
@@ -252,8 +252,8 @@ class ApiController < ApplicationController
 
     api = XML::Node.new 'api'
     version = XML::Node.new 'version'
-    version['minimum'] = '0.5';
-    version['maximum'] = '0.5';
+    version['minimum'] = "#{API_VERSION}";
+    version['maximum'] = "#{API_VERSION}";
     api << version
     area = XML::Node.new 'area'
     area['maximum'] = MAX_REQUEST_AREA.to_s;