260223:1415 20260223 nextJS & nestJS Best pratices
All checks were successful
Build and Deploy / deploy (push) Successful in 4m44s
All checks were successful
Build and Deploy / deploy (push) Successful in 4m44s
This commit is contained in:
@@ -23,6 +23,7 @@ import { winstonConfig } from './modules/monitoring/logger/winston.config';
|
||||
// Entities & Interceptors
|
||||
import { AuditLog } from './common/entities/audit-log.entity';
|
||||
import { AuditLogInterceptor } from './common/interceptors/audit-log.interceptor';
|
||||
import { IdempotencyInterceptor } from './common/interceptors/idempotency.interceptor';
|
||||
import { MaintenanceModeGuard } from './common/guards/maintenance-mode.guard';
|
||||
|
||||
// Modules
|
||||
@@ -176,6 +177,11 @@ import { AuditLogModule } from './modules/audit-log/audit-log.module';
|
||||
provide: APP_INTERCEPTOR,
|
||||
useClass: AuditLogInterceptor,
|
||||
},
|
||||
// 🔑 4. Register Global Interceptor (Idempotency) — ป้องกัน duplicate POST/PUT requests
|
||||
{
|
||||
provide: APP_INTERCEPTOR,
|
||||
useClass: IdempotencyInterceptor,
|
||||
},
|
||||
],
|
||||
})
|
||||
export class AppModule {}
|
||||
|
||||
Reference in New Issue
Block a user