Don't check for open property on game appeals

This commit is contained in:
regalijan 2023-10-19 16:50:37 -04:00
parent c848453b1b
commit 7f39f0d89f
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

View File

@ -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();