From 111b25b3da1b09c97e8dd761590c639c8daacf0f Mon Sep 17 00:00:00 2001 From: Regalijan Date: Wed, 15 May 2024 14:36:29 -0400 Subject: [PATCH] Fix existing appeal check --- app/routes/appeals.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/routes/appeals.tsx b/app/routes/appeals.tsx index 93c590f..0e3b650 100644 --- a/app/routes/appeals.tsx +++ b/app/routes/appeals.tsx @@ -41,7 +41,7 @@ export async function loader({ context }: { context: RequestContext }) { !Boolean(await dataKV.get(`blockedappeal_${currentUser.id}`)) && !Boolean( await context.env.D1.prepare( - "SELECT * FROM appeals WHERE open = 1 AND user = ? LIMIT 1;", + "SELECT * FROM appeals WHERE approved IS NULL AND json_extract(user, '$.id') = ? LIMIT 1;", ) .bind(currentUser.id) .first(),