Typo in challenge

What is your hint or solution suggestion?
Note: I am using the replit project.

I had to modify server.js file to complete the test bc of a typo; specifically, the try statement in the function ‘removeOne’, see below:

try {
removeOne(pers._id, function (err, data) //change pers._id to p._id
//code
}

Challenge: Delete One Document Using model.findByIdAndRemove

Link to the challenge:

https://www.freecodecamp.org/learn/apis-and-microservices/mongodb-and-mongoose/delete-one-document-using-model.findbyidandremove

Welcome there,

It does not look like a typo. The thing containing the correct _id will be the document returned in the .save callback:

I see, just realized my mistake there. Thanks

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.