Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Convert boolean to int for bind statement
  • Loading branch information
regalijan committed Oct 19, 2023
1 parent 8b15251 commit 89073ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions/api/mod-queue/list.ts
Expand Up @@ -51,7 +51,7 @@ export async function onRequestGet(context: RequestContext) {
await context.env.D1.prepare(
"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();

if (results)
Expand Down

0 comments on commit 89073ae

Please sign in to comment.