mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-30 05:43:55 +00:00
zen: fix go plan usage limit
This commit is contained in:
parent
f2100dcfd8
commit
8c739b4a7d
@ -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(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user