From c4e9ffb2d49b59423d59f1ad5254bb97b01588fc Mon Sep 17 00:00:00 2001 From: Bernt Christian Egeland Date: Wed, 9 Aug 2023 20:30:26 +0000 Subject: [PATCH] delete network --- src/server/api/routers/networkRouter.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/server/api/routers/networkRouter.ts b/src/server/api/routers/networkRouter.ts index 6d36cf5e..35c04f97 100644 --- a/src/server/api/routers/networkRouter.ts +++ b/src/server/api/routers/networkRouter.ts @@ -213,10 +213,9 @@ export const networkRouter = createTRPCRouter({ .mutation(async ({ ctx, input }) => { try { // Delete ZT network - const createCentralNw = await ztController.network_delete( - input.nwid, - input.central, - ); + const createCentralNw = await ztController + .network_delete(input.nwid, input.central) + .catch(() => []); // Ignore errors if (input.central) return createCentralNw;