From 72918bd87a588e6c007fb1886f57d2035126bf60 Mon Sep 17 00:00:00 2001 From: jason Date: Sun, 22 Mar 2026 15:27:49 -0500 Subject: [PATCH] fix(rack-planner): accept sfpCount and wanCount in module creation API route --- server/routes/racks.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/routes/racks.ts b/server/routes/racks.ts index d0f70d3..d7fc5d2 100644 --- a/server/routes/racks.ts +++ b/server/routes/racks.ts @@ -61,7 +61,7 @@ racksRouter.delete('/:id', async (req: Request, res: Response, next: NextFunctio racksRouter.post('/:id/modules', async (req: Request, res: Response, next: NextFunction) => { try { - const { name, type, uPosition, uSize, manufacturer, model, ipAddress, notes, portCount, portType } = + const { name, type, uPosition, uSize, manufacturer, model, ipAddress, notes, portCount, portType, sfpCount, wanCount } = req.body as { name: string; type: ModuleType; @@ -73,9 +73,11 @@ racksRouter.post('/:id/modules', async (req: Request, res: Response, next: NextF notes?: string; portCount?: number; portType?: PortType; + sfpCount?: number; + wanCount?: number; }; res.status(201).json( - ok(await moduleService.createModule(req.params.id, { name, type, uPosition, uSize, manufacturer, model, ipAddress, notes, portCount, portType })) + ok(await moduleService.createModule(req.params.id, { name, type, uPosition, uSize, manufacturer, model, ipAddress, notes, portCount, portType, sfpCount, wanCount })) ); } catch (e) { next(e);