Frank 5 月之前
父節點
當前提交
bc2e4e23c9
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      cloud/app/src/routes/zen/handler.ts

+ 2 - 0
cloud/app/src/routes/zen/handler.ts

@@ -409,6 +409,7 @@ export async function handler(
         tx
           .select({
             balance: BillingTable.balance,
+            paymentMethodID: BillingTable.paymentMethodID,
             monthlyLimit: BillingTable.monthlyLimit,
             monthlyUsage: BillingTable.monthlyUsage,
             timeMonthlyUsageUpdated: BillingTable.timeMonthlyUsageUpdated,
@@ -418,6 +419,7 @@ export async function handler(
           .then((rows) => rows[0]),
       )
 
+      if (!billing.paymentMethodID) throw new CreditsError("No payment method")
       if (billing.balance <= 0) throw new CreditsError("Insufficient balance")
       if (
         billing.monthlyLimit &&