Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Update A Value In ExpressJS/MongoDB


var admin = await User.findOne({role: 1});
let newPassword = await bcrypt.hash(req.body.newPassword, 10);
admin.password = newPassword;
admin.save();
 
PREVIOUS NEXT
Tagged: #Update #A #Value #In
ADD COMMENT
Topic
Name
1+2 =