mongoose-delete
mongoose-delete copied to clipboard
Support for `deletedId`
We use mongoose-delete heavily in our application and sometimes we have a need to delete multiple documents across different collections as a part of a single delete action.
I was thinking that it'd be nice to be able to provide a unique id to mongoose-delete when a document is deleted so that we can use it later to easily restore those documents.
I faced similar problems, and since this plugin hasn't been updated/maintained for a while, I decided to create my own. It supports hooks/middleware for delete operations, custom field names and so on.