Fixed the search api endpoint to work for now.
This commit is contained in:
parent
26c4c4d10e
commit
d5470ce0e3
1 changed files with 6 additions and 1 deletions
|
@ -42,7 +42,12 @@ class LighthouseControllers {
|
|||
*/
|
||||
async search (ctx) {
|
||||
await getSuggestions(ctx.query.s).then(function (result) {
|
||||
ctx.body = result;
|
||||
let results = result.claim[0].options;
|
||||
let cResults = [];
|
||||
for (let pResult of results) {
|
||||
cResults.push(pResult._source);
|
||||
}
|
||||
ctx.body = cResults;
|
||||
});
|
||||
// ctx.body = 'Search...';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue