From 1c003e30a4d192dda01bacacb6e6d1eebfaeaf0f Mon Sep 17 00:00:00 2001 From: GreenEclipse Date: Tue, 20 Oct 2026 17:07:24 +0200 Subject: [PATCH] fix --- apps/api/internal/billing/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/internal/billing/service.go b/apps/api/internal/billing/service.go index 0a6a064..b72b6da 100644 --- a/apps/api/internal/billing/service.go +++ b/apps/api/internal/billing/service.go @@ -167,7 +167,7 @@ func (s *Service) CreditsOverview(ctx context.Context, companyID uuid.UUID, lowT out.IsFreePlan = ent.IsFreePlan out.IsPaidPlan = ent.IsPaidPlan // Free (0 monthly credits) is not "low credits" — AI is simply unavailable. - out.LowCredits = ent.CanUseAI && remaining <= lowThreshold && remaining > 0 + out.LowCredits = ent.CanUseAI && remaining <= float64(lowThreshold) && remaining > 0 // Resolve features from the plan row already loaded (avoids a second CapabilitiesForCompany // round-trip that re-queries company_plans + credit_balances). Still uses GetFeatureGates cache // and plans.features JSON overrides via decodeFeaturesJSON + ResolveEffectiveFeaturesEx.