cURL
curl --request POST \ --url https://api.example.com/secured/update_user \ --header 'Content-Type: application/json' \ --data ' { "id": 123, "tipoUsuario": "<string>", "correo": "<string>", "nombre": "<string>", "apellido": "<string>" } '
{ "msg": "<string>", "401 Unauthorized": {} }
Update an existing user account information
Authorization
curl --location 'http://localhost:8080/secured/update_user' \ --header 'Content-Type: application/json' \ --header 'Authorization: YOUR_JWT_TOKEN' \ --data-raw '{ "id": 5, "tipoUsuario": "admin", "correo": "[email protected]", "nombre": "Carlos", "apellido": "Ramírez" }'
{ "msg": "Usuario actualizado con exito" }
{ "msg": "Token_invalido" }
{ "msg": "Sin autorización" }
usuarios
tipoUsuario
correo
nombre
apellido
id
UPDATE usuarios SET tipoUsuario = ?, correo = ?, nombre = ?, apellido = ? WHERE id = ?