wheresvic / mongoose-field-encryption

A simple symmetric encryption plugin for individual fields. Dependency free, only mongoose peer dependency.
MIT License
74 stars 32 forks source link

Add findOneAndUpdate and without $set support #20

Closed vinczedani closed 6 years ago

vinczedani commented 6 years ago

This pr should add the missing hook for findOneAndUpdate since it is a native mongodb call, mongoose has different calls for that and update. It should also add a feature to work with $set and without $set. Closes #14

wheresvic commented 6 years ago

Hi @vinczedani

Thanks a lot for taking the time to contribute and raise a PR :)

I had a look at it and I have some suggestions before I can merge this in! I hope you can do them but if not, let me know and I can also do some of them,

Cheers!

vinczedani commented 6 years ago

I think I fixed the changes you requested. I agree that this change is just a minor update, since it doesn't break the current interface.