PUTDocumentation 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.
/api/perfil/:id
Updates the strNombrePerfil and bitAdministrador fields of an existing profile. The endpoint also manages permisos_perfil records automatically based on the change in administrator status:
- Was not admin → now admin: all existing permissions for this profile are deleted and replaced with full permissions for every existing module.
- Was admin → no longer admin: all permissions for this profile are deleted, leaving the profile with no module access.
- No change to admin flag: existing permissions are left unchanged.
Path parameters
Primary key of the profile to update.
Request body
Updated profile name. Cannot be empty or whitespace-only.
Updated administrator flag.
Response
true when the update completes without error.The updated profile record as returned by the database.
Error responses
| Status | Message | Cause |
|---|---|---|
400 | ID de perfil inválido | The :id path segment is missing or resolves to 0 or NaN. |
400 | El nombre es obligatorio | strNombrePerfil is missing or is an empty/whitespace string. |
404 | Perfil no encontrado | No record exists with the given id. |
500 | Ocurrió un error interno al actualizar el perfil | Any other unhandled database error. |
Examples
Success response
200
Error response (404)
404