🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
Remove redundant parseInt calls and fix type annotations
Edward Cui63d2906f85fc
diff --git a/server/src/services/import/importQuotaChecker.ts b/server/src/services/import/importQuotaChecker.tsindex cc39eb102..25ed26933 100644--- a/server/src/services/import/importQuotaChecker.ts+++ b/server/src/services/import/importQuotaChecker.ts@@ -96,10 +96,10 @@ export class ImportQuotaTracker {format: "JSONEachRow",});- const rows = await processResults<{ month: string; count: string }>(grandfatheredResult);+ const rows = await processResults<{ month: string; count: number }>(grandfatheredResult);for (const row of rows) {const existing = monthlyUsage.get(row.month) || 0;- monthlyUsage.set(row.month, existing + parseInt(row.count, 10));+ monthlyUsage.set(row.month, existing + row.count);}}@@ -124,10 +124,10 @@ export class ImportQuotaTracker {format: "JSONEachRow",});- const rows = await processResults<{ month: string; count: string }>(newSitesResult);+ const rows = await processResults<{ month: string; count: number }>(newSitesResult);for (const row of rows) {const existing = monthlyUsage.get(row.month) || 0;- monthlyUsage.set(row.month, existing + parseInt(row.count, 10));+ monthlyUsage.set(row.month, existing + row.count);}}