Trying to pass data from middleware context.data = {id:1} to a function, not working :(

Hi, I have a middleware inside functions/api/_middleware.ts now I'm trying to pass some data from that middleware to a function like I want to access that data on onRequest(data) like that. right now, it returning an empty object.
Was this page helpful?