diff --git a/functions/api/mod-queue/list.ts b/functions/api/mod-queue/list.ts index d25d963..f1a930f 100644 --- a/functions/api/mod-queue/list.ts +++ b/functions/api/mod-queue/list.ts @@ -56,10 +56,10 @@ export async function onRequestGet(context: RequestContext) { await context.env.D1.prepare( `SELECT id FROM ${table} - WHERE created_at < ? ${entryType === "gma" ? "" : "AND open = ?"} + WHERE created_at < ? AND open = ? ORDER BY created_at DESC LIMIT 25;`, ) - .bind(before, entryType === "gma" ? undefined : Number(!showClosed)) + .bind(before, Number(!showClosed)) .all(); if (results)