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;
21
21
type SupportedResponse = FastifyReply | ExpressResponse ;
22
22
23
23
export enum SupportedFramework {
24
- Express ,
25
- Fastify ,
24
+ Express = 'express' ,
25
+ Fastify = 'fastify' ,
26
26
}
27
27
28
28
export type AugmentedResponse = {
@@ -195,7 +195,7 @@ export const prepareWrapCreateRequestHandler = (forFramework: SupportedFramework
195
195
) : ( this : unknown , options : CreateRequestHandlerOptions ) => GenericRequestHandler {
196
196
return function ( this : unknown , opts : CreateRequestHandlerOptions ) : GenericRequestHandler {
197
197
if ( ! opts . getLoadContext ) opts [ 'getLoadContext' ] = ( ) => ( { } ) ;
198
- fill ( opts , 'getLoadContext' , wrapGetLoadContext ( 'fastify' ) ) ;
198
+ fill ( opts , 'getLoadContext' , wrapGetLoadContext ( forFramework ) ) ;
199
199
const build = typeof opts . build === 'function' ? wrapBuildFn ( opts . build ) : instrumentBuild ( opts . build , true ) ;
200
200
const handler : GenericRequestHandler = createRequestHandler . call ( this , { ...opts , build } ) ;
201
201
return wrapRequestHandler ( handler , forFramework , build ) ;
You can’t perform that action at this time.
0 commit comments