kpfromer / nestjs-typegoose

Typegoose with NestJS
https://kpfromer.github.io/nestjs-typegoose/
MIT License
291 stars 71 forks source link

Dependency Injection Inside a Pre save hook #432

Open shahriar-shojib opened 3 years ago

shahriar-shojib commented 3 years ago

Hello, I would like to perform dependency injection on a pre-save hook function, I haven't found any guides on the docs to do such a thing. Ideally, I would like to be able to do something similar like this: https://docs.nestjs.com/techniques/mongodb#hooks-middleware . Please let me know if it's possible with nestjs-typegoose . Thanks

87789771 commented 2 years ago

me too