File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed
Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -357,7 +357,7 @@ You can define multiple database connections by registering multiple `MikroOrmMo
357357 registerRequestContext: false , // disable automatatic middleware
358358 ...
359359 }),
360- MultiMikroOrmModule . forRoot ()
360+ MikroOrmModule . forMiddleware ()
361361 ],
362362 controllers: [AppController ],
363363 providers: [AppService ],
Original file line number Diff line number Diff line change 1- import type { MultiMikroOrmModuleOptions , NestMiddlewareConsumer } from './typings' ;
1+ import type { MikroOrmMiddlewareModuleOptions , NestMiddlewareConsumer } from './typings' ;
22import type { MiddlewareConsumer } from '@nestjs/common' ;
33
4- export function forRoutesPath ( options : MultiMikroOrmModuleOptions , consumer : MiddlewareConsumer ) {
4+ export function forRoutesPath ( options : MikroOrmMiddlewareModuleOptions , consumer : MiddlewareConsumer ) {
55 const isNestMiddleware = ( consumer : MiddlewareConsumer ) : consumer is NestMiddlewareConsumer => {
66 return typeof ( consumer as any ) . httpAdapter === 'object' ;
77 } ;
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ export interface NestMiddlewareConsumer extends MiddlewareConsumer {
99type MikroOrmNestScopeOptions = {
1010 scope ?: Scope ;
1111} ;
12+
1213export type MikroOrmMiddlewareModuleOptions = {
1314 /**
1415 * Routes to apply the middleware.
You can’t perform that action at this time.
0 commit comments