File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed
opensaas-sh/app_diff/src/analytics
template/app/src/analytics Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 11--- template/app/src/analytics/stats.ts
22+++ opensaas-sh/app/src/analytics/stats.ts
3- @@ -2,7 +2,6 @@
3+ @@ -2,11 +2,9 @@
44 import { type DailyStatsJob } from 'wasp/server/jobs';
55 import Stripe from 'stripe';
66 import { stripe } from '../payment/stripe/stripeClient';
77- import { listOrders } from '@lemonsqueezy/lemonsqueezy.js';
88 import { getDailyPageViews, getSources } from './providers/plausibleAnalyticsUtils';
9- // import { getDailyPageViews, getSources } from './providers/googleAnalyticsUtils';
10- import { paymentProcessor } from '../payment/paymentProcessor';
11- @@ -42,17 +41,7 @@
9+ - // import { getDailyPageViews, getSources } from './providers/googleAnalyticsUtils';
10+ - import { paymentProcessor } from '../payment/paymentProcessor';
11+ import { SubscriptionStatus } from '../payment/plans';
12+ + // import { getDailyPageViews, getSources } from './providers/googleAnalyticsUtils';
13+
14+ export type DailyStatsProps = { dailyStats?: DailyStats; weeklyStats?: DailyStats[]; isLoading?: boolean };
15+
16+ @@ -42,17 +40,7 @@
1217 paidUserDelta -= yesterdaysStats.paidUserCount;
1318 }
1419
2328- default:
2429- throw new Error(`Unsupported payment processor: ${paymentProcessor.id}`);
2530- }
26- + let totalRevenue = await fetchTotalStripeRevenue()
31+ + let totalRevenue = await fetchTotalStripeRevenue();
2732
2833 const { totalViews, prevDayViewsChangePercent } = await getDailyPageViews();
2934
30- @@ -163,39 +152 ,3 @@
35+ @@ -163,38 +151 ,3 @@
3136 // Revenue is in cents so we convert to dollars (or your main currency unit)
3237 return totalRevenue / 100;
3338 }
6671- throw error;
6772- }
6873- }
69- -
Original file line number Diff line number Diff line change @@ -198,4 +198,3 @@ async function fetchTotalLemonSqueezyRevenue() {
198198 throw error ;
199199 }
200200}
201-
You can’t perform that action at this time.
0 commit comments