I can't delete an item with mongoos

every time I run my code in order to pass the challenge I get this message: Deleting an item should succeed

the problem is that I re-write my code many times and I still can not figure out what is exactly the problem.

so any help please?
and thank you guys in advance <3

my code so far
**
const removeById = function(personId, done) {

Person.findByIdAndRemove(personId , (err, PersonRemoved) => {

if(err) return console.log(err);

done(null, PersonRemoved)

});

};
**

Challenge: Delete One Document Using model.findByIdAndRemove

Link to the challenge:

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