@@ -57,7 +57,7 @@ export class AppModule implements NestModule {
57
57
};
58
58
// and pass the "next" function as callback
59
59
// to the "als.run" method together with the store.
60
- als .run (store , () => next ());
60
+ this . als .run (store , () => next ());
61
61
})
62
62
// and register it for all routes (in case of Fastify use '(.*)')
63
63
.forRoutes (' *' );
@@ -87,7 +87,7 @@ export class AppModule {
87
87
};
88
88
// and pass the "next" function as callback
89
89
// to the "als.run" method together with the store.
90
- als .run (store , () => next ());
90
+ this . als .run (store , () => next ());
91
91
})
92
92
// and register it for all routes (in case of Fastify use '(.*)')
93
93
.forRoutes (' *' );
@@ -205,9 +205,9 @@ export class CatService {
205
205
@Injectable ()
206
206
@Dependencies (AsyncLocalStorage , CatRepository )
207
207
export class CatService {
208
- constructor (als , catRepository ) {
208
+ constructor (cls , catRepository ) {
209
209
// We can inject the provided ClsService instance,
210
- this .als = als
210
+ this .cls = cls
211
211
this .catRepository = catRepository
212
212
}
213
213
@@ -223,7 +223,7 @@ export class CatService {
223
223
224
224
``` ts
225
225
export interface MyClsStore extends ClsStore {
226
- userId: number
226
+ userId: number ;
227
227
}
228
228
```
229
229
0 commit comments