Skip to content

Commit

Permalink
Merge pull request #1202 from datacite/rest-add-other-option
Browse files Browse the repository at this point in the history
Return dois from other registration agencies through REST API (optionally)
  • Loading branch information
jrhoads committed Jul 1, 2024
2 parents 971448d + 22527d2 commit 226f15d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/controllers/datacite_dois_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ def index
# facets are enabled by default
disable_facets = params[:disable_facets]

# registration agencies are disabled by default
exclude_registration_agencies = true
if params[:include_other_registration_agencies].present?
exclude_registration_agencies = false
end

if params[:id].present?
response = DataciteDoi.find_by_id(params[:id])
elsif params[:ids].present?
Expand All @@ -84,7 +90,7 @@ def index
DataciteDoi.query(
params[:query],
state: params[:state],
exclude_registration_agencies: true,
exclude_registration_agencies: exclude_registration_agencies,
published: params[:published],
created: params[:created],
registered: params[:registered],
Expand Down

0 comments on commit 226f15d

Please sign in to comment.