File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -265,7 +265,7 @@ Middleware (also called pre and post hooks) are functions which are passed contr
265
265
name: Cat .name ,
266
266
useFactory : () => {
267
267
const schema = CatsSchema ;
268
- schema .pre (' save' , () => console .log (' Hello from pre save' ));
268
+ schema .pre (' save' , function () { console .log (' Hello from pre save' ) } );
269
269
return schema ;
270
270
},
271
271
},
@@ -286,11 +286,11 @@ Like other [factory providers](https://docs.nestjs.com/fundamentals/custom-provi
286
286
imports: [ConfigModule ],
287
287
useFactory : (configService : ConfigService ) => {
288
288
const schema = CatsSchema ;
289
- schema .pre (' save' , () =>
289
+ schema .pre (' save' , function () {
290
290
console .log (
291
291
` ${configService .get (' APP_NAME' )}: Hello from pre save ` ,
292
292
),
293
- );
293
+ } );
294
294
return schema ;
295
295
},
296
296
inject: [ConfigService ],
You can’t perform that action at this time.
0 commit comments