Mongoose: findOneAndUpdate doesn’t return updated document
Why this happens? The default is to return the original, unaltered document. If you want the new, updated document to be returned you have to pass an additional argument: an object with the new property set to true. From the mongoose docs: Query#findOneAndUpdate Model.findOneAndUpdate(conditions, update, options, (error, doc) => { // error: any errors that … Read more