Docs: <Is it possible to use handler deps in guards/middleware?> #4092
-
SummaryHello, what to do if I'd like to perform some db checks on private endpoint, so I want to get my db/mq dependency to check if user is not blocked? It seems to have a dependency dict, but it is unclear, how do I extract dependency at this point |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
no it's not currently possible, #1129 check this if you are using fullstack https://discord.com/channels/919193495116337154/1343345321232830656/1343345322214035456 now you can easily use the connection parameter of your guard function and get the db from the state (provided you configure it this way but you should be able to adapt easily). I'm doing this for instance, interesting line is
|
Beta Was this translation helpful? Give feedback.
try then to get a connection using the pool key, the plugin doesnt put a connection key in the state, only the pool