-
Hey hope someone can help me out here! I was trying to access some data I inserted with middleware using
I know that the data has been inserted because I access it in my handlers, but in the middleware it always comes up as none, hopefully I'm just doing something wrong, or is this not possible? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Possible it's being set at an inner layer to the middleware being run. All handlers are run after middleware, but middleware registration order matters in this way. For example: .wrap(A) // <- sets req data
.wrap(B) // <- outer layer ("wraps" things before it); can't access req data .wrap(B) // <- can access req data
.wrap(A) // <- sets req data |
Beta Was this translation helpful? Give feedback.
-
That is 100% the issue, I didn't realize it works from the inside out, but that makes sense. Thanks so much!! |
Beta Was this translation helpful? Give feedback.
Possible it's being set at an inner layer to the middleware being run. All handlers are run after middleware, but middleware registration order matters in this way. For example: