Skip to content

Commit

Permalink
show only findable dois in summary stats for researcher
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Aug 24, 2019
1 parent 927bfe3 commit facfd89
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/controllers/researchers_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ def index
end

def show
state = current_user.nil? || current_user.role_id == "user" ? "findable" : nil

options = {}
options[:meta] = { dois: doi_count(researcher_id: params[:id]) }
options[:meta] = { dois: doi_count(researcher_id: params[:id], state: state) }
options[:is_collection] = false
render json: ResearcherSerializer.new(@researcher, options).serialized_json, status: :ok
end
Expand Down

0 comments on commit facfd89

Please sign in to comment.