/api/modulo/:id
Updates the strNombreModulo field of an existing module. The new name is automatically converted to uppercase before being stored.
Path parameters
Primary key of the module to update.
Request body
Updated module name. Stored in uppercase regardless of the casing supplied.
Response
true when the update completes without error.The updated module record as returned by the database.
Error responses
| Status | Message | Cause |
|---|---|---|
200 (with success: false) | ID de módulo inválido. | The :id path segment is missing or resolves to 0 or NaN. |
200 (with success: false) | El nombre del módulo es obligatorio. | strNombreModulo is missing or falsy in the request body. |
200 (with success: false) | No se pudo actualizar el módulo. | Any unhandled database error during the update. |
Validation and database errors for this endpoint return HTTP
200 with success: false in the body rather than a 4xx/5xx HTTP status code. The handler does not return a 404 if the id does not match any record — it returns success: true with data set to undefined.Examples
Success response
200
Error response (missing name)
200