Skip to content

Commit

Permalink
use the key "collection" instead of "results" in federated search res…
Browse files Browse the repository at this point in the history
…ult hash to maintain the endpoint expected schema
  • Loading branch information
Bilelkihal committed Oct 8, 2024
1 parent d2134bf commit 8634818
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ontologies_api_client/models/class.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ def self.search(*args)
search_result = federated_get(params) do |url|
"#{url}/search"
end
merged_collections = {results: [], errors: []}
merged_collections = {collection: [], errors: []}
search_result.each do |result|
if result.collection
merged_collections[:results].concat(result.collection)
merged_collections[:collection].concat(result.collection)
elsif result.errors
merged_collections[:errors] << result.errors
end
Expand Down

0 comments on commit 8634818

Please sign in to comment.