diff --git a/backend/services/reward-service/src/domain/domain.module.ts b/backend/services/reward-service/src/domain/domain.module.ts index 14646ce4..4315537b 100644 --- a/backend/services/reward-service/src/domain/domain.module.ts +++ b/backend/services/reward-service/src/domain/domain.module.ts @@ -1,8 +1,10 @@ import { Module } from '@nestjs/common'; import { RewardCalculationService } from './services/reward-calculation.service'; import { RewardExpirationService } from './services/reward-expiration.service'; +import { InfrastructureModule } from '../infrastructure/infrastructure.module'; @Module({ + imports: [InfrastructureModule], providers: [ RewardCalculationService, RewardExpirationService, diff --git a/backend/services/reward-service/src/infrastructure/infrastructure.module.ts b/backend/services/reward-service/src/infrastructure/infrastructure.module.ts index 67cbebca..c13bf0ec 100644 --- a/backend/services/reward-service/src/infrastructure/infrastructure.module.ts +++ b/backend/services/reward-service/src/infrastructure/infrastructure.module.ts @@ -24,15 +24,19 @@ import { REFERRAL_SERVICE_CLIENT, AUTHORIZATION_SERVICE_CLIENT } from '../domain provide: REWARD_SUMMARY_REPOSITORY, useClass: RewardSummaryRepositoryImpl, }, + // Register concrete classes first + ReferralServiceClient, + AuthorizationServiceClient, + WalletServiceClient, + // Then provide token aliases using useExisting { provide: REFERRAL_SERVICE_CLIENT, - useClass: ReferralServiceClient, + useExisting: ReferralServiceClient, }, { provide: AUTHORIZATION_SERVICE_CLIENT, - useClass: AuthorizationServiceClient, + useExisting: AuthorizationServiceClient, }, - WalletServiceClient, ], exports: [ PrismaService,