So, you have a route configured for the verb DELETE in the sense of RESTful. You don't seem to call it that or use it in a RESTful way.
Your application should really treat this as a REST request and return the status and content as an answer corresponding to what happened. You are being redirected to another URL right now. This is the wrong approach. But if you just don't understand REST, then do it this way, but change the route to GET .
What is it worth once you understand your use and testing, perhaps using curl or the like, as shown . Then perhaps consider .findByIdAndRemove() instead.
Offer.findByIdAndRemove(req.params.id, function (err,offer){ if(err) { throw err; }
And then actually checking the answer is what you expect before just sending or sending a valid or erroneous answer. This is what you should do.
source share