From dad999b98e54ce01a4a508b15874f9807361850e Mon Sep 17 00:00:00 2001 From: Christina Cortland Date: Tue, 28 Nov 2023 16:48:30 -0500 Subject: [PATCH] Just return term list in wikidata search response --- .../qa/authorities/wikidata/generic_authority.rb | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/app/authorities/qa/authorities/wikidata/generic_authority.rb b/app/authorities/qa/authorities/wikidata/generic_authority.rb index ccf1d3e..e4ecfbd 100644 --- a/app/authorities/qa/authorities/wikidata/generic_authority.rb +++ b/app/authorities/qa/authorities/wikidata/generic_authority.rb @@ -58,18 +58,9 @@ def build_query_url(q) # @note WARNING: If this is moved to QA, it should NOT return json with results: and response_header: keys # unless code is put in place to process a request for the response_header data. def parse_authority_response(raw_response) - formatted_response = raw_response['search'].map do |doc| + raw_response['search'].map do |doc| { id: doc['id'], uri: doc['concepturi'], label: doc['label'], context: extended_context(doc) } end - { - results: formatted_response, - response_header: { - start_record: 1, - requested_records: "UNKNOWN", - retrieved_records: raw_response.count, - total_records: "UNKNOWN" - } - } end def extended_context(doc)