Fixed broken search

This commit is contained in:
Ole Eskild Steensen 2022-11-08 15:46:11 +01:00
parent 58ad09bf49
commit 85660bc077

View File

@ -1,16 +1,8 @@
const lunrjs = require('lunr');
require('dotenv').config();
const handler = async (event) => {
try {
if (!process.env.dgEnableSearch) {
return {
statusCode: 200,
body: JSON.stringify([])
}
}
const search = event.queryStringParameters.term;
if(!search) throw('Missing term query parameter');