adds search api

This commit is contained in:
Christian Beutel
2024-03-10 00:52:45 +01:00
parent 963b589b2d
commit 01e1053569
25 changed files with 271 additions and 87 deletions

View File

@@ -8,6 +8,8 @@ export async function POST(event: RequestEvent) {
const r = await ms.index(event.params.index as string).search(data.q, data.options);
return json(r);
} catch (e: any) {
throw error(e.status, e)
console.log(e);
throw error(e.httpStatus, e)
}
}

View File

@@ -10,6 +10,6 @@ export async function POST(event: RequestEvent) {
});
return json(r);
} catch (e: any) {
throw error(e.status, e)
throw error(e.httpStatus, e)
}
}