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(),