HU14: Está autenticado
POST /api/users/auth
{
"jwt": "dfasdgvlashngf;vlkasdjflkjasl'df"
}
{
"message": "true"
}
HU15: Crear cuenta, registro en el sistema
POST /api/users
{
"password": "123456",
"email": "[email protected]",
"phone": "123456789",
"address": "Calle falsa 123",
"fullName": "Test",
"profilePicture": "base64",
"role": "Administrador"
}
{
"message": "usuario creado correctamente"
}
HU16: Obtener cuenta
GET /api/users/${id}
sin request body
{
"id": 1,
"password": "123456",
"email": "[email protected]",
"phone": "123456789",
"address": "Calle falsa 123",
"fullName": "Test"
}
HU17: Cerrar sesión
POST /api/users/logout
{
"jwt": "dfasdgvlashngf;vlkasdjflkjasl'df"
}
{
"message": "sesion cerrada correctamente"
}
HU18: Actualizar cuenta
PUT /api/users/${id}
{
"password": "123456",
"correo": "[email protected]",
"telefono": "123456789",
"direccion": "Calle falsa 123",
"nombres": "Test"
}
{
"message": "usuario actualizado correctamente"
}
HU21: Autenticarse en el sistema
POST /api/users/login
{
"email": "[email protected]",
"password": "123456"
}
{
"jwt": "dfasdgvlashngf;vlkasdjflkjasl'df"
}