From 2a933090b553e05a8485ac8261ef8049d3ef1758 Mon Sep 17 00:00:00 2001 From: casperiv0 <53900565+casperiv0@users.noreply.github.com> Date: Thu, 28 Sep 2023 08:09:59 +0200 Subject: [PATCH] fix: small fixes --- apps/client/src/pages/officer/bureau-of-firearms.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/client/src/pages/officer/bureau-of-firearms.tsx b/apps/client/src/pages/officer/bureau-of-firearms.tsx index b1b556177..04c18914b 100644 --- a/apps/client/src/pages/officer/bureau-of-firearms.tsx +++ b/apps/client/src/pages/officer/bureau-of-firearms.tsx @@ -37,13 +37,13 @@ export default function BureauOfFirearms({ data }: Props) { const tableState = useTableState({ pagination: asyncTable.pagination }); async function handleAcceptOrDecline(id: string, type: "ACCEPT" | "DECLINE") { - const { json } = await execute({ + const { json } = await execute({ path: `/leo/bureau-of-firearms/${id}`, method: "POST", data: { type }, }); - if (json) { + if (json?.id) { await invalidateQuery(); asyncTable.update(id, json); }