我看了看,却找不出问题。前置中间件似乎不起作用。我已经更新了节点和所有模块。const schema = mongoose.Schema(...)console.log('post save') // I don't see this in the console})
MySchema: mongoose.modelmodel.save().then((
我的数据库中有一个用户的mongoose模型。我有一个更新控制器,它在我的模型上调用findByIdAndUpdate方法。现在,当我在我的数据库中存储密码时,我想首先对它们进行散列,所以我有: // if password ismodified then hash it});
现在,当我的更新控制器调用findB