Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

coerce types

Steven Tey5cce016215ec
diff --git a/apps/web/app/(ee)/api/cron/aggregate-clicks/route.ts b/apps/web/app/(ee)/api/cron/aggregate-clicks/route.ts
index fdf1d1db06..427625eb23 100644
--- a/apps/web/app/(ee)/api/cron/aggregate-clicks/route.ts
+++ b/apps/web/app/(ee)/api/cron/aggregate-clicks/route.ts
@@ -123,13 +123,13 @@ export async function GET(req: Request) {
earnings: reward.amount * linkClicks,
};
})
- .filter((c) => c !== null);
+ .filter((c) => c !== null) as Prisma.CommissionCreateManyInput[];
console.table(commissionsToCreate);
// // Create commissions
await prisma.commission.createMany({
- data: commissionsToCreate as Prisma.CommissionCreateManyInput[],
+ data: commissionsToCreate,
});
// getting a list of click reward program enrollments