From 5d2774fb2e65f131be2895897b6187caf23dfecf Mon Sep 17 00:00:00 2001 From: regalijan Date: Thu, 19 Oct 2023 16:49:09 -0400 Subject: [PATCH] Create mod queue list skeleton --- functions/api/mod-queue/list.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 functions/api/mod-queue/list.ts diff --git a/functions/api/mod-queue/list.ts b/functions/api/mod-queue/list.ts new file mode 100644 index 0000000..6f97295 --- /dev/null +++ b/functions/api/mod-queue/list.ts @@ -0,0 +1,12 @@ +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", + }, + }); +}