From f921b20e1586b6d2d508713aa505f9fb7801f6c3 Mon Sep 17 00:00:00 2001 From: Esteban Date: Mon, 2 Feb 2026 18:00:46 -0600 Subject: [PATCH] meter type id --- water-api/src/routes/project.routes.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/water-api/src/routes/project.routes.ts b/water-api/src/routes/project.routes.ts index 60bc819..a27e9db 100644 --- a/water-api/src/routes/project.routes.ts +++ b/water-api/src/routes/project.routes.ts @@ -40,11 +40,20 @@ router.post('/', authenticateToken, validateCreateProject, projectController.cre * PUT /projects/:id * Protected endpoint - update an existing project * Headers: Authorization: Bearer - * Body: { name?: string, description?: string, area_name?: string, location?: string, status?: string } + * Body: { name?: string, description?: string, area_name?: string, location?: string, status?: string, meter_type_id?: string } * Response: { success: true, data: Project } */ router.put('/:id', authenticateToken, validateUpdateProject, projectController.update); +/** + * PATCH /projects/:id + * Protected endpoint - partially update an existing project + * Headers: Authorization: Bearer + * Body: { name?: string, description?: string, area_name?: string, location?: string, status?: string, meter_type_id?: string } + * Response: { success: true, data: Project } + */ +router.patch('/:id', authenticateToken, validateUpdateProject, projectController.update); + /** * DELETE /projects/:id * Protected endpoint - delete a project (requires admin role)