matteodelabre / mongoose-beautiful-unique-validation

Plugin for Mongoose that turns duplicate errors into regular Mongoose validation errors
MIT License
117 stars 38 forks source link

fix: add hook for 'updateOne' #61

Open hwaranglee opened 5 years ago

hwaranglee commented 5 years ago

at first, thanks for your open source code, We update the data using the updateOne method. Unique validation did not work at this time. Looking at the reasons, we found that the update method works, but not in updateOne. So I added updateOne hook. Please take a look.