diff --git a/src/routes/search.json.js b/src/routes/search.json.js index 0e94a02..c730cae 100644 --- a/src/routes/search.json.js +++ b/src/routes/search.json.js @@ -27,9 +27,7 @@ export async function get(req, res) { this.ref('url') this.field('data') - all.flat().forEach((doc) => { - this.add(doc) - }) + all.flat().forEach((doc) => this.add(doc)) }) res.setHeader('Content-Type', 'application/json') res.end(JSON.stringify(idx)) diff --git a/src/template.html b/src/template.html index 658c0e8..236038f 100644 --- a/src/template.html +++ b/src/template.html @@ -18,6 +18,9 @@ %sapper.head% + + + %sapper.scripts% - - - - +