Skip to content

Commit

Permalink
Merge pull request #84 from LD4P/dev
Browse files Browse the repository at this point in the history
Merge dev to main
  • Loading branch information
sfolsom authored Nov 29, 2023
2 parents cfe9ef7 + 1ad6aa0 commit ef1a52f
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions app/authorities/qa/authorities/wikidata/generic_authority.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ef1a52f

Please sign in to comment.