Skip to content

Commit

Permalink
add additional parameters to cursor-based pagination. #476
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Apr 20, 2020
1 parent 076915e commit c59856b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions app/controllers/dois_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,24 @@ def index
"provider-id" => params[:provider_id],
"consortium-id" => params[:consortium_id],
"client-id" => params[:client_id],
"funder-id" => params[:funder_id],
"affiliation-id" => params[:affiliation_id],
"resource-type-id" => params[:resource_type_id],
prefix: params[:prefix],
certificate: params[:certificate],
created: params[:created],
registered: params[:registered],
"has-citations" => params[:has_citations],
"has-references" => params[:has_references],
"has-parts" => params[:has_parts],
"has-part-of" => params[:has_part_of],
"has-versions" => params[:has_versions],
"has-version-of" => params[:has_version_of],
"has-views" => params[:has_views],
"has-downloads" => params[:has_downloads],
"has-person" => params[:has_person],
"has-affiliation" => params[:has_affiliation],
"has-funder" => params[:has_funder],
# The cursor link should be an array of values, but we want to encode it into a single string for the URL
"page[cursor]" => page[:cursor] ? make_cursor(results) : nil,
"page[number]" => page[:cursor].nil? && page[:number].present? ? page[:number] + 1 : nil,
Expand Down

0 comments on commit c59856b

Please sign in to comment.