diff --git a/server/lib/billing.js b/server/lib/billing.js index 8d13518..9558d99 100644 --- a/server/lib/billing.js +++ b/server/lib/billing.js @@ -1,6 +1,6 @@ const { get, run } = require('./postgres'); -const FREE_MONTHLY_CREDITS = 0; +const FREE_MONTHLY_CREDITS = 3; const TRIAL_MONTHLY_CREDITS = 30; const PRO_MONTHLY_CREDITS = 100; const TOPUP_DEFAULT_CREDITS = 100; @@ -255,7 +255,6 @@ const getOrCreateAccount = async (db, userId) => { }; const getAvailableCredits = (account) => { - if (account.plan !== 'pro') return 0; const monthlyRemaining = Math.max(0, account.monthlyAllowance - account.usedThisCycle); return monthlyRemaining + Math.max(0, account.topupBalance); }; @@ -570,9 +569,6 @@ const syncRevenueCatWebhookEvent = async (db, eventPayload) => { const consumeCredits = (account, cost) => { if (cost <= 0) return 0; - if (account.plan !== 'pro') { - throw createInsufficientCreditsError(cost, 0); - } const available = getAvailableCredits(account); if (available < cost) {