Remove gma lookup work around

Table now has an "open" column
This commit is contained in:
regalijan 2023-10-19 16:50:39 -04:00
parent 5ca71a43c2
commit 53c06cbe56
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

View File

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