From 7f39f0d89fb338e04ec00f6388206e256f062717 Mon Sep 17 00:00:00 2001 From: regalijan Date: Thu, 19 Oct 2023 16:50:37 -0400 Subject: [PATCH] Don't check for open property on game appeals --- functions/api/mod-queue/list.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/functions/api/mod-queue/list.ts b/functions/api/mod-queue/list.ts index eae254a..a264f3d 100644 --- a/functions/api/mod-queue/list.ts +++ b/functions/api/mod-queue/list.ts @@ -54,7 +54,10 @@ export async function onRequestGet(context: RequestContext) { To avoid any potential injection attacks we enforce a list of specific values and permissions for table names */ await context.env.D1.prepare( - `SELECT id FROM ${table} WHERE created_at < ? AND open = ? ORDER BY created_at DESC LIMIT 25;`, + `SELECT id + FROM ${table} + WHERE created_at < ? ${entryType === "gma" ? "" : "AND open = ?"} + ORDER BY created_at DESC LIMIT 25;`, ) .bind(before, Number(!showClosed)) .all();