How do I set a context dynamically?
I don't fully understand middleware in trpc and especially using it for adminProcedures.
So my trpc.ts looks like this:
What I don't understand is how do I inject user into the context?
I get user with public procedure:
Now I try to inject it inside the procedure but when I console log the user inside the middleware function it shows undefined.
0 Replies