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)