🐛 Fix wrong counting usage

This commit is contained in:
2025-07-29 14:43:40 +08:00
parent 28f6893c68
commit 83059374e9
3 changed files with 5 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ public class QuotaService(
{
// The billable unit is MiB
var billableUnit = (long)Math.Ceiling(newFileSize / 1024.0 / 1024.0 * costMultiplier);
var totalBillableUsage = await usage.GetTotalBillableUsage();
var totalBillableUsage = await usage.GetTotalBillableUsage(accountId);
var quota = await GetQuota(accountId);
return (totalBillableUsage + billableUnit <= quota, billableUnit, quota);
}