Monday 1 May 2017

NodeJs Mongoose passing parameters to post findAndUpdate

I want to use post findAndUpdate middlewares to save a log datas of all my mongoose model changes. I use findAndUpdate in three places:

  • Update Model's data
  • change Model status
  • archive / restore Model

So when I use the post findAndUpdate middlewares, I want to Knwo wich one of the three findAndUpdate was executed.

Is there a way to pass parameters from findAndUpdate to post findAndUpdate middlewares.?



via medKHELIFI

No comments:

Post a Comment