How should access the auth service in the model #1386
Replies: 3 comments 4 replies
-
You need to pass it to model function Since model is not directly in http context there is no direct way to just pull it |
Beta Was this translation helpful? Give feedback.
-
in this situation like me. I think just the user is necessary to be accessible in all of the application to be used in It should be a good idea that or maybe in config we could have a variable can be true or false and user can set want to access user globally or not |
Beta Was this translation helpful? Give feedback.
-
As @RomainLanz and @McSneaky has mentioned, that is not how Node.js works. I suggest learning about Node.js first before opting for a framework. The basic understand will help you a lot |
Beta Was this translation helpful? Give feedback.
-
I have the model like below and have a relation for get the price of the model for user with loyalty level of the user
I had a model like below. but I can not access the
auth
service in the model.is there any way to access the
auth
in the model?Beta Was this translation helpful? Give feedback.
All reactions