How to get the Express req.user property in Mongoose Schema validation method?

后端 未结 0 861
再見小時候
再見小時候 2021-01-29 07:08

I have a model where certain fields should just be edited by admin users.

How can I pass the Express req.user object to my Mongoose model/schema validation function?

相关标签:
回答
  • 消灭零回复
提交回复
热议问题