Fix production credit service wiring

Register the credits service through its route-facing interface and verify the application module resolves the binding without touching MySQL.
This commit is contained in:
Rocky
2026-08-16 19:39:06 +08:00
parent a17d058748
commit c415c53a1c
2 changed files with 56 additions and 0 deletions
@@ -34,6 +34,7 @@ import com.osglab.account.features.credits.repositories.BillingTransactionRunner
import com.osglab.account.features.credits.repositories.ExposedBillingTransactionRunner
import com.osglab.account.features.credits.routes.AuthenticatedUserExtractor
import com.osglab.account.features.credits.routes.creditRoutes
import com.osglab.account.features.credits.services.CreditOperations
import com.osglab.account.features.credits.services.CreditService
import com.osglab.account.features.credits.services.ReferralRewardConfig
import com.osglab.account.features.gateway.adapters.CreditReservationAdapter
@@ -336,6 +337,7 @@ fun accountServerModule(config: AppConfig): Module = module {
),
)
}
single<CreditOperations> { get<CreditService>() }
single<TrialCreditGranter> {
TrialCreditGranter { accountId ->
get<CreditService>().grantSignupTrial(