У меня есть эта ошибка с этим кодом:
async function get(user) {
user = await Joi.validate(user, userSchemaGet, { abortEarly: false });
await User.findOne(
{_id: user._id},
(err, res) => {
if(err){
console.log("ERROR : ")
console.log(err)
} else {
console.log("res")
console.log(res);
if(bcrypt.hash(user.password, 10) === res.hashedPassword) {
return res;
}
}
});
}
Я прочитал весь стековый поток на эту тему, но ничего не происходит. PS: он отлично работает в последний день ...