Isto é o que eu estava procurando:
try {
var accounts = await Account.findOneAndUpdate(
{"username" : "[email protected]"},
{$set: {"password" : "aaaa"}},
{new : true}
);
res.status(200).json(accounts);
} catch (error) {
handleError(res, error.message);
}
ou (obrigado @JohnnyHK pela dica find vs findOne!):
try {
var accounts = await Account.findOne()
.where("username").in(["[email protected]"])
.exec();
accounts.password = 'asdf';
accounts.save();
res.status(200).json(accounts);
} catch (error) {
handleError(res, error.message);
}