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.

remove orderBy id

Steven Tey39044fe80ba5
diff --git a/apps/web/lib/partnerstack/import-commissions.ts b/apps/web/lib/partnerstack/import-commissions.ts
index d654d3f823..f75a9348d7 100644
--- a/apps/web/lib/partnerstack/import-commissions.ts
+++ b/apps/web/lib/partnerstack/import-commissions.ts
@@ -118,23 +118,15 @@ async function createCommission({
const customer = await prisma.customer.findFirst({
where: {
+ projectId: workspaceId,
OR: [
- {
- projectId: workspaceId,
- email: commission.customer.email,
- },
- {
- projectId: workspaceId,
- externalId: commission.customer.external_key,
- },
+ { email: commission.customer.email },
+ { externalId: commission.customer.external_key },
],
},
include: {
link: true,
},
- orderBy: {
- id: "asc",
- },
});
if (!customer) {
diff --git a/apps/web/lib/tolt/import-commissions.ts b/apps/web/lib/tolt/import-commissions.ts
index 86535ffcfa..b7f0791096 100644
--- a/apps/web/lib/tolt/import-commissions.ts
+++ b/apps/web/lib/tolt/import-commissions.ts
@@ -162,9 +162,6 @@ async function createCommission({
include: {
link: true,
},
- orderBy: {
- id: "asc",
- },
});
if (!customerFound) {