From 53c06cbe56953d9456ccfdf60863f59748e7d308 Mon Sep 17 00:00:00 2001 From: regalijan Date: Thu, 19 Oct 2023 16:50:39 -0400 Subject: [PATCH] Remove gma lookup work around Table now has an "open" column --- functions/api/mod-queue/list.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)