auth a medias
This commit is contained in:
+8
-6
@@ -45,20 +45,21 @@ import { TipoCarrito } from './institucion-tipo-carrito/entity/tipo-carrito.enti
|
||||
import { TipoEntrada } from './tipo-entrada/entity/tipo-entrada.entity';
|
||||
import { TipoUsuario } from './tipo-usuario/entity/tipo-usuario.entity';
|
||||
import { Usuario } from './usuario/entity/usuario.entity';
|
||||
import { AuthModule } from './auth/auth.module';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
ConfigModule.forRoot({ isGlobal: true }),
|
||||
TypeOrmModule.forRootAsync({
|
||||
inject: [ConfigService],
|
||||
useFactory: (config: ConfigService) => {
|
||||
useFactory: (configService: ConfigService) => {
|
||||
return {
|
||||
type: 'mariadb',
|
||||
host: config.get<string>('DB_HOST'),
|
||||
database: config.get<string>('DB'),
|
||||
username: config.get<string>('DB_USER'),
|
||||
password: config.get<string>('DB_PASSWORD'),
|
||||
port: config.get<number>('DB_PORT'),
|
||||
host: configService.get<string>('DB_HOST'),
|
||||
database: configService.get<string>('DB'),
|
||||
username: configService.get<string>('DB_USER'),
|
||||
password: configService.get<string>('DB_PASSWORD'),
|
||||
port: configService.get<number>('DB_PORT'),
|
||||
synchronize: true,
|
||||
entities: [
|
||||
Carrera,
|
||||
@@ -88,6 +89,7 @@ import { Usuario } from './usuario/entity/usuario.entity';
|
||||
};
|
||||
},
|
||||
}),
|
||||
AuthModule,
|
||||
CarreraModule,
|
||||
CarreraProgramaModule,
|
||||
CarritoModule,
|
||||
|
||||
Reference in New Issue
Block a user