I tried(sequelize model) to update the values in the table, but it will update the only one value in the table.check the below example
employee.updateAttributes({first_name : value.first_name},
            {last_name : value.last_name},
            {email : value.email},
            {password : value.password},
            {phone : value.phone}
            ).on('success',function(employee){
    message.message = "Employee updated successfully";
    message.employee = employee;
    message.successMessage = "Success";
    callback(message);
})
                You should provide a single object
employee.updateAttributes({
  first_name : value.first_name,
  last_name : value.last_name,
  email : value.email,
  password : value.password,
  phone : value.phone
})
                        use .update() in lieu of .updateAttributes()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With