Masquerade-Circus / mongoose-history-plugin

Mongoose plugin that saves history in JsonPatch format and SemVer format.
Apache License 2.0
47 stars 25 forks source link

Delete histories #30

Open khalld opened 3 years ago

khalld commented 3 years ago

Hi, on README i din't understand how to delete histories object. For example, i need to delete an Object of my collection like that:

Collection.deleteOne({_id: req.params.id}) .exec((err) => { if(err) { err.statusCode = 404; res.end(err); } })

how can i delete all related historical objects?