Skip to content

Commit

Permalink
proper 501 error status for legacy method. Closes #172
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Jan 3, 2019
1 parent 06dba67 commit 6358ef5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 5 additions & 0 deletions app/controllers/dois_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,11 @@ def delete_test_dois
render json: { message: "Test DOIs deleted." }.to_json, status: :ok
end

# legacy method
def status
render json: { message: "Not Implemented." }.to_json, status: :not_implemented
end

protected

def set_doi
Expand Down
6 changes: 1 addition & 5 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
get '/dois/application/x-research-info-systems/:id', :to => 'dois#show', constraints: { :id => /.+/ }, defaults: { format: :ris }
get '/dois/text/x-bibliography/:id', :to => 'dois#show', constraints: { :id => /.+/ }, defaults: { format: :citation }

# content negotiation for collections
get '/dois/application/vnd.datacite.datacite+xml', :to => 'dois#index', defaults: { format: :datacite }
get '/dois/application/vnd.datacite.datacite+json', :to => 'dois#index', defaults: { format: :datacite_json }
get '/dois/application/vnd.crosscite.crosscite+json', :to => 'dois#index', defaults: { format: :crosscite }
Expand All @@ -40,11 +41,6 @@
get 'dois/:id/get-url', :to => 'dois#get_url', constraints: { :id => /.+/ }
get 'dois/get-dois', :to => 'dois#get_dois'

# manage prefixes, keep database in sync for changes via MDS
post 'client-prefixes/set-created', :to => 'client_prefixes#set_created'
post 'client-prefixes/set-provider', :to => 'client_prefixes#set_provider'
post 'provider-prefixes/set-created', :to => 'provider_prefixes#set_created'

resources :heartbeat, only: [:index]
resources :index, only: [:index]

Expand Down

0 comments on commit 6358ef5

Please sign in to comment.