API v1: Add note about removal to 410 response

pull/1785/head
Michael Frister 10 years ago
parent 7ea3920fbe
commit 907566af88
  1. 7
      config/routes.rb

@ -65,7 +65,12 @@ OpenProject::Application.routes.draw do
# This does not care if the route actually existed to
# avoid maintaining knowledge of the now removed api.
match '/v1/*rest', via: [:get, :post, :put, :delete],
to: proc { [410, {}, ['']] }
to: proc {
[410,
{ 'Content-Type' => 'text/plain' },
["OpenProject API v1 has been removed.\n" \
'See https://www.openproject.org/news/65']]
}
namespace :v2 do

Loading…
Cancel
Save