Skip to content

Commit

Permalink
simplify code. datacite/datacite#359
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Nov 22, 2019
1 parent af8e854 commit 92312ca
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions app/controllers/clients_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,6 @@ def destroy
end

def totals
return [] unless params[:provider_id].present?

page = { size: 0, number: 1 }
state = current_user.present? && current_user.is_admin_or_staff? && params[:state].present? ? params[:state] : "registered,findable"
response = Doi.query(nil, provider_id: params[:provider_id], state: state, page: page, totals_agg: "client")
Expand Down
2 changes: 0 additions & 2 deletions app/controllers/prefixes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,6 @@ def update
end

def totals
return [] unless params[:client_id].present?

page = { size: 0, number: 1}
response = Doi.query(nil, client_id: params[:client_id], state: "findable,registered", page: page, totals_agg: "prefix")
registrant = prefixes_totals(response.response.aggregations.prefixes_totals.buckets)
Expand Down

0 comments on commit 92312ca

Please sign in to comment.