DeprecationWarning: Mongoose:
findOneAndUpdate()and
findOneAndDelete()without the
useFindAndModifyoption set to false are deprecated
官网:https://mongoosejs.com/docs/deprecations.html
解决
入口文件加入
mongoose.set('useFindAndModify', false)
DeprecationWarning: Mongoose:
findOneAndUpdate()and
findOneAndDelete()without the
useFindAndModifyoption set to false are deprecated
官网:https://mongoosejs.com/docs/deprecations.html
解决
入口文件加入
mongoose.set('useFindAndModify', false)