13 lines
426 B
TypeScript

export async function onRequestGet(context: RequestContext) {
const { searchParams } = new URL(context.request.url);
const entryType = searchParams.get("type") ?? "all";
const showClosed = searchParams.get("showClosed") === "true";
const items: { type: string; data: { [k: string]: any } }[] = [];
return new Response(JSON.stringify(items), {
headers: {
"content-type": "application/json",
},
});
}