Skip to content

Commit

Permalink
show only findable dois to researcher
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Aug 24, 2019
1 parent facfd89 commit cb57cc1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/concerns/countable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ module Countable
extend ActiveSupport::Concern

included do
def doi_count(client_id: nil, provider_id: nil, consortium_id: nil, researcher_id: nil)
def doi_count(client_id: nil, provider_id: nil, consortium_id: nil, researcher_id: nil, state: nil)
if client_id
response = Doi.query(nil, client_id: client_id, page: { number: 1, size: 0 })
elsif provider_id
response = Doi.query(nil, provider_id: provider_id, page: { number: 1, size: 0 })
elsif consortium_id
response = Doi.query(nil, consortium_id: consortium_id, page: { number: 1, size: 0 })
elsif researcher_id
response = Doi.query(nil, researcher_id: researcher_id, page: { number: 1, size: 0 })
response = Doi.query(nil, researcher_id: researcher_id, state: state, page: { number: 1, size: 0 })
else
response = Doi.query(nil, page: { number: 1, size: 0 })
end
Expand Down

0 comments on commit cb57cc1

Please sign in to comment.