correcion de errores
This commit is contained in:
@@ -1,22 +1,19 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { Module, forwardRef } from '@nestjs/common';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { OpcionService } from './opcion.service';
|
||||
import { OpcionController } from './opcion.controller';
|
||||
import { PreguntaModule } from 'src/pregunta/pregunta.module';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { Opcion } from './entities/opcion.entity';
|
||||
import { TipoPregunta } from 'src/tipo_pregunta/entities/tipo_pregunta.entity';
|
||||
import { PreguntaOpcion } from 'src/pregunta_opcion/entities/pregunta_opcion.entity';
|
||||
import { Pregunta } from 'src/pregunta/entities/pregunta.entity';
|
||||
import { PreguntaOpcion } from '../pregunta_opcion/entities/pregunta_opcion.entity';
|
||||
import { PreguntaModule } from '../pregunta/pregunta.module';
|
||||
import { Pregunta } from '../pregunta/entities/pregunta.entity';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
TypeOrmModule.forFeature([Opcion, Pregunta, PreguntaOpcion]),
|
||||
PreguntaModule,
|
||||
TipoPregunta
|
||||
TypeOrmModule.forFeature([Opcion, Pregunta, PreguntaOpcion]), // Importar todas las entidades necesarias
|
||||
forwardRef(() => PreguntaModule), // Usar forwardRef para dependencia circular
|
||||
],
|
||||
controllers: [OpcionController],
|
||||
providers: [OpcionService],
|
||||
exports: [OpcionService, TypeOrmModule],
|
||||
exports: [OpcionService, TypeOrmModule], // Exportar TypeOrmModule si otros módulos necesitan los repositorios
|
||||
})
|
||||
|
||||
export class OpcionModule {}
|
||||
export class OpcionModule {}
|
||||
Reference in New Issue
Block a user