#Is there a way to access the PayloadRequest from anywhere?

6 messages · Page 1 of 1 (latest)

vague cape
#

I need a cookie set on the request to payload in a function 4 levels deeper, is possible to get the request somewhere on the payload object? I've tried payload.express.request.cookies but that didn't include my cookie 😦

dry krakenBOT
solemn hamlet
#

I don’t know what you mean by “4 levels deeper”

fallow blade
#

Just a guess...

beforeChangeHook calls foo which calls bar which calls theFourthLevel.

solemn hamlet
#

yeah so I would pass req down through as a param in that case

vague cape
#

Yeah, that's what I'm trying to avoid, passing down the req param through 4 functions