Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Israel-Perez/Nuxt-Secure/llms.txt

Use this file to discover all available pages before exploring further.

PUT /api/modulo/:id Updates the strNombreModulo field of an existing module. The new name is automatically converted to uppercase before being stored.

Path parameters

id
number
required
Primary key of the module to update.

Request body

strNombreModulo
string
required
Updated module name. Stored in uppercase regardless of the casing supplied.

Response

success
boolean
required
true when the update completes without error.
data
object
required
The updated module record as returned by the database.

Error responses

StatusMessageCause
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

curl --request PUT \
  --url https://your-domain.com/api/modulo/6 \
  --header 'Content-Type: application/json' \
  --cookie 'auth_token=<your-jwt>' \
  --data '{"strNombreModulo": "Ventas Externas"}'

Success response

200
{
  "success": true,
  "data": {
    "id": 6,
    "strNombreModulo": "VENTAS EXTERNAS"
  }
}

Error response (missing name)

200
{
  "success": false,
  "message": "El nombre del módulo es obligatorio."
}