HF RL Explorer

Task: Fix Mongoose findOneAndUpdate to Return Updated Document

Task: Fix Mongoose findOneAndUpdate to Return Updated Document: a task in Terminal-Lego-15k (Harbor dataset). You are working with a Node.js application that uses Mongoose to interact with MongoDB. The application has a bug: when using findOneAndUpdate() to update a document, the callback receives…

The task

You are working with a Node.js application that uses Mongoose to interact with MongoDB. The application has a bug: when using `findOneAndUpdate()` to update a document, the callback receives the **original document** instead of the **updated document**.

Part of PrimeIntellect/Terminal-Lego-15k.