dsanel / mongoose-delete

Mongoose Soft Delete Plugin
MIT License
346 stars 101 forks source link

Perform additional changes on delete #120

Closed SergioArrighi closed 1 year ago

SergioArrighi commented 2 years ago

Hello all,

I am looking for a way to perform additional changes to my document when delete is invoked. I checked a little bit the code and it doesn't seem to me like it it supported. Also mongoose doesn't provide pre/post hooks for delete so I was wondering what is the best way to achieve this.

Thanks and best regards

dsanel commented 1 year ago

Currently, we don't have support for this. It can be interesting to have it. If you create PR I will be happy to check and add it to the repo.