Setting:
Problem:
On the profile page the user model gets updated, but the password should not be transferred (anyway it is hashed and not available.).
Approach:
So I tried the following.
user.$save().then(cb);
the user-object is a $ressouce and it does create a PUT /users/?id=1 request to the server, but strongloop tries to INSERT the entity instead of updating, and the error pops up:
"message":"ER_NO_DEFAULT_FOR_FIELD: Field 'password' doesn't have a default value"
Question:
How can I tell strongloop to make an update in the PUT and not an insert?
Thank you!
A workaround was provided here.
So in your code replace the call to user.$save
by the following
userData = {'someCustomUserProperty':'someValue'};
User.prototype$updateAttributes({ id: user.id }, userData);