Convert boolean to int for bind statement
This commit is contained in:
@ -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)
|
.bind(table, before, showClosed ? 0 : 1)
|
||||||
.all();
|
.all();
|
||||||
|
|
||||||
if (results)
|
if (results)
|
||||||
|
Reference in New Issue
Block a user