From 4b977f3eae807395daa15b251ad6bc6f877f05d9 Mon Sep 17 00:00:00 2001 From: Esteban Date: Tue, 3 Feb 2026 02:36:11 -0600 Subject: [PATCH] route patch fix --- water-api/src/routes/concentrator.routes.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/water-api/src/routes/concentrator.routes.ts b/water-api/src/routes/concentrator.routes.ts index 2bd8c64..086c79d 100644 --- a/water-api/src/routes/concentrator.routes.ts +++ b/water-api/src/routes/concentrator.routes.ts @@ -38,7 +38,7 @@ router.post( /** * PUT /concentrators/:id - * Update an existing concentrator + * Update an existing concentrator (full update) * Body: { serial_number?, name?, project_id?, location?, status?, ip_address?, firmware_version? } * Protected endpoint - requires authentication */ @@ -49,6 +49,19 @@ router.put( concentratorController.update ); +/** + * PATCH /concentrators/:id + * Update an existing concentrator (partial update) + * Body: { serial_number?, name?, project_id?, location?, status?, ip_address?, firmware_version? } + * Protected endpoint - requires authentication + */ +router.patch( + '/:id', + authenticateToken, + validateUpdateConcentrator, + concentratorController.update +); + /** * DELETE /concentrators/:id * Delete a concentrator (fails if gateways are associated)