This commit is contained in:
2023-02-02 10:50:25 -06:00
parent 30bc761f3b
commit ebd6e8a608
7 changed files with 1213 additions and 1176 deletions
-15
View File
@@ -1,10 +1,6 @@
import { Module } from '@nestjs/common';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { TypeOrmModule } from '@nestjs/typeorm';
import {
GoogleRecaptchaModule,
GoogleRecaptchaNetwork,
} from '@nestlab/google-recaptcha';
import { AuthModule } from './auth/auth.module';
import { BcryptModule } from './bcrypt/bcrypt.module';
@@ -99,17 +95,6 @@ import { ModuloMotivoModule } from './modulo-motivo/modulo-motivo.module';
@Module({
imports: [
ConfigModule.forRoot({ isGlobal: true }),
GoogleRecaptchaModule.forRootAsync({
inject: [ConfigService],
useFactory: (configService: ConfigService) => {
return {
secretKey: configService.get<string>('GOOGLE_RECAPTCHA_KEY'),
response: (req) => req.headers.recaptcha,
skipIf: configService.get<string>('STATE') !== 'produccion',
network: GoogleRecaptchaNetwork.Recaptcha,
};
},
}),
TypeOrmModule.forRootAsync({
inject: [ConfigService],
useFactory: (configService: ConfigService) => {