fix(leaderboard-service): 修复 DI 注入问题 - 使用 useExisting 替代 useClass
- ReferralServiceClient 和 IdentityServiceClient 使用 useExisting - 避免在 DomainModule 中重新创建实例导致 HttpService 不可用 - 复用 InfrastructureModule 中已创建的实例 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
7d87296d11
commit
a503bda266
|
|
@ -11,11 +11,11 @@ import { IdentityServiceClient } from '../infrastructure/external/identity-servi
|
|||
providers: [
|
||||
{
|
||||
provide: REFERRAL_SERVICE_CLIENT,
|
||||
useClass: ReferralServiceClient,
|
||||
useExisting: ReferralServiceClient,
|
||||
},
|
||||
{
|
||||
provide: IDENTITY_SERVICE_CLIENT,
|
||||
useClass: IdentityServiceClient,
|
||||
useExisting: IdentityServiceClient,
|
||||
},
|
||||
LeaderboardCalculationService,
|
||||
VirtualRankingGeneratorService,
|
||||
|
|
|
|||
Loading…
Reference in New Issue