Techiio-author
Started by Bruce MccullamSep 23, 2021

Open
mongoose post hook get previous state of document?

0 VIEWES 0 LIKES 0 DISLIKES SHARE
0 LIKES 0 DISLIKES 0 VIEWES SHARE

Is it possible to somehow grab the previous doc and doc before it was saved in a mongoose post hook?

I need to do a compare between the 2 docs after save and send changes to another service but I don't want to do this is all the different points in the API but just in the 1 hook in mongoose :/

0 Replies

You must be Logged in to reply
Techiio-logo

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Developed and maintained by Wikiance
Developed and maintained by Wikiance