diff --git a/functions/api/mod-queue/list.ts b/functions/api/mod-queue/list.ts index 9a829cc..6f1f709 100644 --- a/functions/api/mod-queue/list.ts +++ b/functions/api/mod-queue/list.ts @@ -49,9 +49,9 @@ export async function onRequestGet(context: RequestContext) { const items = []; const { results }: { results?: { created_at: number; id: string }[] } = await context.env.D1.prepare( - "SELECT created_at, id FROM ? WHERE created_at < ? ORDER BY created_at DESC LIMIT 25;" + "SELECT created_at, id FROM ? WHERE created_at < ? AND open = ? ORDER BY created_at DESC LIMIT 25;" ) - .bind(table, before) + .bind(table, before, !showClosed) .all(); if (results)