Skip to content

Commit

Permalink
fix repository_type keyword arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
wendelfabianchinsamy committed Feb 13, 2024
1 parent 7cf1808 commit 7cfabf1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app/graphql/types/repository_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -277,31 +277,31 @@ def subject

def works(**args)
ElasticsearchModelResponseConnection.new(
dois(args),
dois(**args),
context: context, first: args[:first], after: args[:after],
)
end

def datasets(**args)
args[:resource_type_id] = "Dataset"
ElasticsearchModelResponseConnection.new(
dois(args),
dois(**args),
context: context, first: args[:first], after: args[:after],
)
end

def publications(**args)
args[:resource_type_id] = "Text"
ElasticsearchModelResponseConnection.new(
dois(args),
dois(**args),
context: context, first: args[:first], after: args[:after],
)
end

def softwares(**args)
args[:resource_type_id] = "Software"
ElasticsearchModelResponseConnection.new(
dois(args),
dois(**args),
context: context, first: args[:first], after: args[:after],
)
end
Expand All @@ -310,7 +310,7 @@ def data_management_plans(**args)
args[:resource_type_id] = "Text"
args[:resource_type] = "Data Management Plan"
ElasticsearchModelResponseConnection.new(
dois(args),
dois(**args),
context: context, first: args[:first], after: args[:after],
)
end
Expand All @@ -332,19 +332,19 @@ def prefixes(**args)

def view_count
args = { first: 0 }
@r = dois(args) if @r.nil?
@r = dois(**args) if @r.nil?
@r.response.aggregations.view_count.value.to_i
end

def download_count
args = { first: 0 }
@r = dois(args) if @r.nil?
@r = dois(**args) if @r.nil?
@r.response.aggregations.download_count.value.to_i
end

def citation_count
args = { first: 0 }
@r = dois(args) if @r.nil?
@r = dois(**args) if @r.nil?
@r.response.aggregations.citation_count.value.to_i
end

Expand Down

0 comments on commit 7cfabf1

Please sign in to comment.