Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make showClosed filter actually work
  • Loading branch information
regalijan committed Oct 19, 2023
1 parent 8e5c381 commit 8b15251
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions/api/mod-queue/list.ts
Expand Up @@ -49,9 +49,9 @@ export async function onRequestGet(context: RequestContext) {
const items = [];
const { results }: { results?: { created_at: number; id: string }[] } =
await context.env.D1.prepare(
"SELECT created_at, id FROM ? WHERE created_at < ? 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)
.bind(table, before, !showClosed)
.all();

if (results)
Expand Down

0 comments on commit 8b15251

Please sign in to comment.