Fix: Hide user password at response
ndabAP opened this issue · comments
E. g., products API endpoint returns users passwords.
Hi, i don't know if this is still a problem, but you might be able to add a setting function at the bottom of the api > models > user.js
file such as :
// Return a shallow copy of this record with certain attributes removed at each request
customToJSON () {
return _.omit(this, ['password']);
}
More info, here.
Hey @qvdp, yeah, this is still a problem. I guess I tried your solution some time ago and it didn't work. But I'll try it again.
Would it be possible for you to provide the full file user.js
?