feat(economy): tighten credit earning + deduct on request
Credit economy changes: - creditsPerMinute: 10 -> 2 (45min episode = 90 COOP vs 450) - movieRequestCost: 100 -> 500 (~5.5 episodes per movie) - tvRequestCost: 200 -> 1000 (~11 episodes per season) - tvPerSeasonCost: 50 -> 250 Race condition fix: - Credits now deducted immediately at request time - No more multiple requests before approval - On DECLINED: automatic refund with ADJUSTMENT transaction - On APPROVED: no extra deduction (already paid) Updated schema defaults and all code fallbacks.
This commit is contained in:
@@ -320,7 +320,7 @@ async function backfillUserHistory(user: {
|
||||
|
||||
// Get system settings for credit calculation
|
||||
const settings = await prisma.systemSettings.findFirst();
|
||||
const creditsPerMinute = settings?.creditsPerMinute || 10;
|
||||
const creditsPerMinute = settings?.creditsPerMinute || 2;
|
||||
const minWatchPercent = settings?.minWatchPercent || 80;
|
||||
const minWatchMinutes = settings?.minWatchMinutes || 5;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user