]> git.openstreetmap.org Git - rails.git/commitdiff
Expose relation version to api and fix remaining server status typo in old_relation...
authorThomas Wood <grand.edgemaster@gmail.com>
Mon, 20 Apr 2009 19:44:58 +0000 (19:44 +0000)
committerThomas Wood <grand.edgemaster@gmail.com>
Mon, 20 Apr 2009 19:44:58 +0000 (19:44 +0000)
app/controllers/old_relation_controller.rb
config/routes.rb

index 159b56f202e7058f0568107f342d94e8f903edc4..f8751d27cf2e965806be2f4db60918645f05bed4 100644 (file)
@@ -35,7 +35,7 @@ class OldRelationController < ApplicationController
     rescue ActiveRecord::RecordNotFound
       render :nothing => true, :status => :not_found
     rescue
-      render :nothing => true, :status => :internal_service_error
+      render :nothing => true, :status => :internal_server_error
     end
   end
 end
index fcf22bced98d12cd21a18101bc8b5073174917d6..e95ec1e76ac6df871fabec77f5f9764ac5d9347d 100644 (file)
@@ -36,6 +36,7 @@ ActionController::Routing::Routes.draw do |map|
   map.connect "api/#{API_VERSION}/relation/:id/relations", :controller => 'relation', :action => 'relations_for_relation', :id => /\d+/
   map.connect "api/#{API_VERSION}/relation/:id/history", :controller => 'old_relation', :action => 'history', :id => /\d+/
   map.connect "api/#{API_VERSION}/relation/:id/full", :controller => 'relation', :action => 'full', :id => /\d+/
+  map.connect "api/#{API_VERSION}/relation/:id/:version", :controller => 'old_relation', :action => 'version', :id => /\d+/, :version => /\d+/
   map.connect "api/#{API_VERSION}/relation/:id", :controller => 'relation', :action => 'read', :id => /\d+/, :conditions => { :method => :get }
   map.connect "api/#{API_VERSION}/relation/:id", :controller => 'relation', :action => 'update', :id => /\d+/, :conditions => { :method => :put }
   map.connect "api/#{API_VERSION}/relation/:id", :controller => 'relation', :action => 'delete', :id => /\d+/, :conditions => { :method => :delete }