Skip to content

Commit

Permalink
Use source uri for sinopia search results
Browse files Browse the repository at this point in the history
  • Loading branch information
jgreben committed Nov 14, 2019
1 parent ad2a05a commit 7ec28f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions __tests__/sinopiaSearch.test.js
Expand Up @@ -66,11 +66,11 @@ describe('getSearchResults', () => {
totalHits: 2,
results: [
{
uri: 'repository/cornell/34ef053e-f558-4299-a8a7-c8b79a598d99',
uri: 'http://platform:8080/repository/cornell/34ef053e-f558-4299-a8a7-c8b79a598d99',
label: 'foo bar',
},
{
uri: 'repository/cornell/a96f16c1-a15c-4f4f-8a25-7ed49ba1eebe',
uri: 'http://platform:8080/repository/cornell/a96f16c1-a15c-4f4f-8a25-7ed49ba1eebe',
label: 'foo',
},
],
Expand Down Expand Up @@ -249,7 +249,7 @@ describe('getLookupResults', () => {
}, {
totalHits: 1,
results: [{
uri: 'repository/cornell/3519e138-0f07-46a6-bd82-d4804c3b4890',
uri: 'http://platform:8080/repository/cornell/3519e138-0f07-46a6-bd82-d4804c3b4890',
label: 'Foo',
created: '2019-11-03T15:04:18.015Z',
modified: '2019-11-03T15:04:18.015Z',
Expand Down
2 changes: 1 addition & 1 deletion src/sinopiaSearch.js
Expand Up @@ -59,7 +59,7 @@ export const getSearchResults = async (query, options = {}) => {
return {
totalHits: json.hits.total,
results: json.hits.hits.map(row => ({
uri: row._id,
uri: row._source.uri,
label: row._source.label,
created: row._source.created,
modified: row._source.modified,
Expand Down

0 comments on commit 7ec28f9

Please sign in to comment.