Fixed the search api endpoint to work for now.

This commit is contained in:
Fillerino 2017-09-12 19:25:01 +02:00
parent 26c4c4d10e
commit d5470ce0e3

View file

@ -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...';
}