next-api-decorators icon indicating copy to clipboard operation
next-api-decorators copied to clipboard

refactor: Support AsyncLocalStorage

Open razshlomo opened this issue 2 years ago • 2 comments

This PR refactor the handler code (middlewares and main API function). The change is to run all functions in one Promise instead of creating a Promise for each middleware.

The Motivation is to support AsyncLocalStorage in order to have a context object cross all middlewares and the main API function.

Thanks.

razshlomo avatar Feb 17 '23 15:02 razshlomo