/api/modulo/:id
Permanently removes a module and cascades the deletion to all related records. The endpoint deletes in this order:
- All
permisos_perfilrows whereidModulomatches the givenid. - All
menurows whereidModulomatches the givenid. - The
modulorecord itself.
Path parameters
number
required
Primary key of the module to delete.
Response
boolean
required
true when the module and all related records are deleted successfully.string
required
Confirmation string. Always
"Módulo y sus permisos asociados eliminados correctamente." on success.Error responses
Errors for this endpoint return HTTP
200 with success: false in the body rather than a 4xx/5xx HTTP status code.Examples
Success response
200
Error response (invalid ID)
200