File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/remix/src/utils/serverAdapters Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ type SupportedRequest = FastifyRequest | ExpressRequest;
2121type SupportedResponse = FastifyReply | ExpressResponse ;
2222
2323export enum SupportedFramework {
24- Express ,
25- Fastify ,
24+ Express = 'express' ,
25+ Fastify = 'fastify' ,
2626}
2727
2828export type AugmentedResponse = {
@@ -195,7 +195,7 @@ export const prepareWrapCreateRequestHandler = (forFramework: SupportedFramework
195195 ) : ( this : unknown , options : CreateRequestHandlerOptions ) => GenericRequestHandler {
196196 return function ( this : unknown , opts : CreateRequestHandlerOptions ) : GenericRequestHandler {
197197 if ( ! opts . getLoadContext ) opts [ 'getLoadContext' ] = ( ) => ( { } ) ;
198- fill ( opts , 'getLoadContext' , wrapGetLoadContext ( 'fastify' ) ) ;
198+ fill ( opts , 'getLoadContext' , wrapGetLoadContext ( forFramework ) ) ;
199199 const build = typeof opts . build === 'function' ? wrapBuildFn ( opts . build ) : instrumentBuild ( opts . build , true ) ;
200200 const handler : GenericRequestHandler = createRequestHandler . call ( this , { ...opts , build } ) ;
201201 return wrapRequestHandler ( handler , forFramework , build ) ;
You can’t perform that action at this time.
0 commit comments