javascript - Why can't I delete a mongoose model's object properties? -
When a user is registered with my API, they return a user object. Before returning to the object, I remove the head password and salt properties. I have to use
user.salt = undefined; User.pass = undefined;
Because when I try
delete user.salt; Delete User.pass; Delete To use "itemprop =" text "> you have to call the column in a simple JavaScript object so that you can easily You can manipulate:
user = user.toObject (); Delete User.salt; Delete User.pass;
Comments
Post a Comment