Skip to content

Commit

Permalink
fix:unauth user access IPAM
Browse files Browse the repository at this point in the history
  • Loading branch information
Adekabang authored Nov 27, 2024
1 parent 8329e4e commit 2181f63
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions resources/scripts/routers/AdminIpamRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,15 @@ export const routes: Route[] = [
},
{
path: ':poolId',
loader: ({ params }) =>
query(getPoolKey(parseInt(params.poolId!)), () =>
getAddressPool(parseInt(params.poolId!))
),
loader: async ({ params }) => {
try {
const poolId = parseInt(params.poolId!);
const pool = await query(getPoolKey(poolId), () => getAddressPool(poolId));
return pool;
} catch (error) {
return null;
}
},
element: lazyLoad(lazy(() => import('./AdminIpamRouter'))),
handle: {
crumb: data => ({
Expand Down

0 comments on commit 2181f63

Please sign in to comment.