@@ -57,7 +57,7 @@ export class AppModule implements NestModule {
5757 };
5858 // and pass the "next" function as callback
5959 // to the "als.run" method together with the store.
60- als .run (store , () => next ());
60+ this . als .run (store , () => next ());
6161 })
6262 // and register it for all routes (in case of Fastify use '(.*)')
6363 .forRoutes (' *' );
@@ -87,7 +87,7 @@ export class AppModule {
8787 };
8888 // and pass the "next" function as callback
8989 // to the "als.run" method together with the store.
90- als .run (store , () => next ());
90+ this . als .run (store , () => next ());
9191 })
9292 // and register it for all routes (in case of Fastify use '(.*)')
9393 .forRoutes (' *' );
@@ -205,9 +205,9 @@ export class CatService {
205205@Injectable ()
206206@Dependencies (AsyncLocalStorage , CatRepository )
207207export class CatService {
208- constructor (als , catRepository ) {
208+ constructor (cls , catRepository ) {
209209 // We can inject the provided ClsService instance,
210- this .als = als
210+ this .cls = cls
211211 this .catRepository = catRepository
212212 }
213213
@@ -223,7 +223,7 @@ export class CatService {
223223
224224``` ts
225225export interface MyClsStore extends ClsStore {
226- userId: number
226+ userId: number ;
227227}
228228```
229229
0 commit comments