DeprecationWarning: Mongoose: `findOneAndUpdate()` and `findOneAndDelete()` without the `useFindAndModify` option set to false are deprecated. See: https://mongoosejs.com/docs/deprecations.html#-findandmodify-
警告:Mongoose:不推荐使用未将“useFindAndModify”选项设置为false的“FindAndDupDate()”和“FindAndDelete()”。
使用mongoose的findOneAndUpdate、FindAndDelete两个方法,返回的数据是未更新的数据,但是库里的数据已经更新了;
解决办法:
new属性 true返回修改后的document;false返回原始数据;