Explorar o código

zen: fix go plan usage limit

Frank hai 1 mes
pai
achega
8c739b4a7d
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      packages/console/app/src/routes/zen/util/handler.ts

+ 3 - 3
packages/console/app/src/routes/zen/util/handler.ts

@@ -654,12 +654,12 @@ export async function handler(
         }
 
         // Check rolling limit
-        if (sub.monthlyUsage && sub.timeMonthlyUpdated) {
+        if (sub.rollingUsage && sub.timeRollingUpdated) {
           const result = Subscription.analyzeRollingUsage({
             limit: liteData.rollingLimit,
             window: liteData.rollingWindow,
-            usage: sub.monthlyUsage,
-            timeUpdated: sub.timeMonthlyUpdated,
+            usage: sub.rollingUsage,
+            timeUpdated: sub.timeRollingUpdated,
           })
           if (result.status === "rate-limited")
             throw new SubscriptionUsageLimitError(