Use Number() instead of tertinary operator

This commit is contained in:
regalijan 2023-10-19 16:49:51 -04:00
parent 510c91250e
commit 58822f8ea1
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

View File

@ -51,7 +51,7 @@ export async function onRequestGet(context: RequestContext) {
await context.env.D1.prepare( await context.env.D1.prepare(
"SELECT created_at, id FROM ? WHERE created_at < ? AND open = ? ORDER BY created_at DESC LIMIT 25;" "SELECT created_at, id FROM ? WHERE created_at < ? AND open = ? ORDER BY created_at DESC LIMIT 25;"
) )
.bind(table, before, showClosed ? 0 : 1) .bind(table, before, Number(showClosed))
.all(); .all();
if (results) if (results)