codepunkt / mongoose-patch-history

Mongoose plugin that saves a history of JSON patch operations for all documents belonging to a schema in an associated 'patches' collection
MIT License
96 stars 21 forks source link

Rollback without saving #64

Closed vinerich closed 4 years ago

vinerich commented 4 years ago

Add an additional option to rollback(objectID, data, save) to rollback the document to a specified PatchID but without saving it back to the DB. Useful for examining an older state of a document.

Code borrowed from #35.