diff --git a/be/algo-with-me-api/src/competition/competition.module.ts b/be/algo-with-me-api/src/competition/competition.module.ts index cc17d66..35d8a02 100644 --- a/be/algo-with-me-api/src/competition/competition.module.ts +++ b/be/algo-with-me-api/src/competition/competition.module.ts @@ -1,5 +1,5 @@ import { BullModule } from '@nestjs/bull'; -import { Module } from '@nestjs/common'; +import { Module, forwardRef } from '@nestjs/common'; import { TypeOrmModule } from '@nestjs/typeorm'; import { CompetitionController } from './controllers/competition.controller'; @@ -33,9 +33,10 @@ import { UserModule } from '@src/user/user.module'; }), AuthModule, UserModule, - DashboardModule, + forwardRef(() => DashboardModule), ], controllers: [ProblemController, CompetitionController], providers: [ProblemService, CompetitionService, CompetitionGateWay], + exports: [CompetitionService], }) export class CompetitionModule {} diff --git a/be/algo-with-me-api/src/dashboard/dashboard.module.ts b/be/algo-with-me-api/src/dashboard/dashboard.module.ts index 18843aa..a02e9fb 100644 --- a/be/algo-with-me-api/src/dashboard/dashboard.module.ts +++ b/be/algo-with-me-api/src/dashboard/dashboard.module.ts @@ -1,4 +1,4 @@ -import { Module } from '@nestjs/common'; +import { Module, forwardRef } from '@nestjs/common'; import { TypeOrmModule } from '@nestjs/typeorm'; import { DashboardController } from './dashboard.controller'; @@ -13,7 +13,7 @@ import { CompetitionProblem } from '@src/competition/entities/competition.proble @Module({ imports: [ TypeOrmModule.forFeature([Dashboard, CompetitionProblem, Competition]), - CompetitionModule, + forwardRef(() => CompetitionModule), ], providers: [DashboardGateway, DashboardService], controllers: [DashboardController],