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

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:

facebooklinkdeintwitter

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Copyright techiio.com @2020 Kolkata, India
made with by Abhishek & Priyanka Jalan
Copyright techiio.com @2020
made with by Abhishek & Priyanka Jalan