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.

update comments

Steven Teyf216b94a24ca
diff --git a/apps/web/app/(ee)/api/admin/partners/[partnerId]/platforms/route.ts b/apps/web/app/(ee)/api/admin/partners/[partnerId]/platforms/route.ts
index 0bb6a10803..8585d051bf 100644
--- a/apps/web/app/(ee)/api/admin/partners/[partnerId]/platforms/route.ts
+++ b/apps/web/app/(ee)/api/admin/partners/[partnerId]/platforms/route.ts
@@ -129,8 +129,7 @@ export const POST = withAdmin(
},
});
- // Queue an index update because an admin corrected the searchable platform
- // identifier.
+ // Queue an index update because an admin corrected the searchable platform identifier
waitUntil(queuePartnerSearchSync({ partnerIds: [partnerId] }));
return NextResponse.json({
diff --git a/apps/web/app/(ee)/api/admin/partners/[partnerId]/route.ts b/apps/web/app/(ee)/api/admin/partners/[partnerId]/route.ts
index 15b690251a..8d7e001cf0 100644
--- a/apps/web/app/(ee)/api/admin/partners/[partnerId]/route.ts
+++ b/apps/web/app/(ee)/api/admin/partners/[partnerId]/route.ts
@@ -160,8 +160,7 @@ export const PATCH = withAdmin(async ({ params, req }) => {
},
});
- // Queue an index update because an admin corrected the partner country, a
- // filterable field.
+ // Queue an index update because an admin corrected the partner country (filterable field)
waitUntil(queuePartnerSearchSync({ partnerIds: [partner.id] }));
// if there was an existing veriff session, trigger a country change verification
diff --git a/apps/web/app/(ee)/api/cron/domains/update/route.ts b/apps/web/app/(ee)/api/cron/domains/update/route.ts
index 49572272c9..92c5d37816 100644
--- a/apps/web/app/(ee)/api/cron/domains/update/route.ts
+++ b/apps/web/app/(ee)/api/cron/domains/update/route.ts
@@ -103,8 +103,7 @@ export async function POST(req: Request) {
]);
// Queue an index update because the domain change rewrote each link's
- // shortLink. Queued after updateShortLinks above, which performs the
- // rewrite.
+ // shortLink. Queued after updateShortLinks above, which performs the rewrite
await queuePartnerSearchSyncForLinks(updatedLinks);
const response = await queueDomainUpdate({
diff --git a/apps/web/lib/actions/partners/accept-program-invite.ts b/apps/web/lib/actions/partners/accept-program-invite.ts
index 56d496baf5..28cf4842f5 100644
--- a/apps/web/lib/actions/partners/accept-program-invite.ts
+++ b/apps/web/lib/actions/partners/accept-program-invite.ts
@@ -98,8 +98,7 @@ export const acceptProgramInviteAction = authPartnerActionClient
partnerId: enrolledPartner.id,
},
}),
- // Queue an index update because the enrollment status moved to
- // approved.
+ // Queue an index update because the enrollment status moved to approved
queuePartnerSearchSync({
enrollmentIds: [enrollment.id],
}),
diff --git a/apps/web/lib/actions/partners/archive-partner.ts b/apps/web/lib/actions/partners/archive-partner.ts
index 3be11a44ba..a89fb80a5c 100644
--- a/apps/web/lib/actions/partners/archive-partner.ts
+++ b/apps/web/lib/actions/partners/archive-partner.ts
@@ -64,8 +64,7 @@ export const archivePartnerAction = authActionClient
},
}),
- // Queue an index update because the enrollment status moved to
- // archived.
+ // Queue an index update because the enrollment status moved to archived
queuePartnerSearchSync({ partnerIds: [partnerId], programId }),
]),
);
diff --git a/apps/web/lib/actions/partners/ban-partner.ts b/apps/web/lib/actions/partners/ban-partner.ts
index 28a7474128..813c2f1cce 100644
--- a/apps/web/lib/actions/partners/ban-partner.ts
+++ b/apps/web/lib/actions/partners/ban-partner.ts
@@ -142,7 +142,7 @@ export const banPartner = async ({
},
}),
- // Queue an index update because the enrollment status moved to banned.
+ // Queue an index update because the enrollment status moved to banned
queuePartnerSearchSync({
enrollmentIds: [programEnrollmentUpdated.id],
}),
diff --git a/apps/web/lib/actions/partners/bulk-approve-partners.ts b/apps/web/lib/actions/partners/bulk-approve-partners.ts
index 8f78fe5fa8..3f3bb8ba0f 100644
--- a/apps/web/lib/actions/partners/bulk-approve-partners.ts
+++ b/apps/web/lib/actions/partners/bulk-approve-partners.ts
@@ -161,8 +161,7 @@ export const bulkApprovePartnersAction = authActionClient
partnerIds: updatedEnrollments.map(({ partnerId }) => partnerId),
}),
- // Queue an index update because the enrollment statuses moved to
- // approved.
+ // Queue an index update because the enrollment statuses moved to approved
queuePartnerSearchSync({
enrollmentIds: updatedEnrollments.map(({ id }) => id),
}),
diff --git a/apps/web/lib/actions/partners/bulk-ban-partners.ts b/apps/web/lib/actions/partners/bulk-ban-partners.ts
index 76ac1f4d19..f7a566daad 100644
--- a/apps/web/lib/actions/partners/bulk-ban-partners.ts
+++ b/apps/web/lib/actions/partners/bulk-ban-partners.ts
@@ -92,8 +92,7 @@ export const bulkBanPartnersAction = authActionClient
waitUntil(
Promise.allSettled([
- // Queue an index update because the enrollment statuses moved to
- // banned.
+ // Queue an index update because the enrollment statuses moved to banned
queuePartnerSearchSync({
enrollmentIds: programEnrollments.map(({ id }) => id),
}),
diff --git a/apps/web/lib/actions/partners/bulk-reject-partner-applications.ts b/apps/web/lib/actions/partners/bulk-reject-partner-applications.ts
index c0d2094ae4..d367080b6d 100644
--- a/apps/web/lib/actions/partners/bulk-reject-partner-applications.ts
+++ b/apps/web/lib/actions/partners/bulk-reject-partner-applications.ts
@@ -90,8 +90,7 @@ export const bulkRejectPartnerApplicationsAction = authActionClient
waitUntil(
(async () => {
await Promise.allSettled([
- // Queue an index update because the enrollment statuses moved to
- // rejected.
+ // Queue an index update because the enrollment statuses moved to rejected
queuePartnerSearchSync({
enrollmentIds: programEnrollments.map(({ id }) => id),
}),
diff --git a/apps/web/lib/actions/partners/reactivate-partner.ts b/apps/web/lib/actions/partners/reactivate-partner.ts
index 3d81a465bb..8b238ad8d3 100644
--- a/apps/web/lib/actions/partners/reactivate-partner.ts
+++ b/apps/web/lib/actions/partners/reactivate-partner.ts
@@ -87,8 +87,7 @@ export const reactivatePartnerAction = authActionClient
// TODO send email to partner
linkCache.expireMany(links),
- // Queue an index update because the enrollment status moved back to
- // approved.
+ // Queue an index update because the enrollment status moved back to approved
queuePartnerSearchSync({ partnerIds: [partnerId], programId }),
trackActivityLog({
diff --git a/apps/web/lib/actions/partners/start-partner-platform-verification.ts b/apps/web/lib/actions/partners/start-partner-platform-verification.ts
index 2535973c6e..1156619e40 100644
--- a/apps/web/lib/actions/partners/start-partner-platform-verification.ts
+++ b/apps/web/lib/actions/partners/start-partner-platform-verification.ts
@@ -97,9 +97,8 @@ export const startPartnerPlatformVerificationAction = authPartnerActionClient
const result = await startVerification();
- // Queue an index update because verification upserts the searchable
- // platform identifier. Queued once here rather than at each of the four
- // upserts.
+ // Queue an index update because verification upserts the searchable platform identifier.
+ // Queued once here rather than at each of the four upserts.
waitUntil(queuePartnerSearchSync({ partnerIds: [partner.id] }));
return result;
diff --git a/apps/web/lib/actions/partners/tags/update-program-partner-tags.ts b/apps/web/lib/actions/partners/tags/update-program-partner-tags.ts
index 5e854cc448..64f574cd97 100644
--- a/apps/web/lib/actions/partners/tags/update-program-partner-tags.ts
+++ b/apps/web/lib/actions/partners/tags/update-program-partner-tags.ts
@@ -96,8 +96,7 @@ export const updateProgramPartnerTagsAction = authActionClient
]);
});
- // Queue an index update because the partner's tags for this program
- // changed.
+ // Queue an index update because the partner's tags for this program changed
waitUntil(queuePartnerSearchSync({ partnerIds, programId }));
waitUntil(
diff --git a/apps/web/lib/actions/partners/unban-partner.ts b/apps/web/lib/actions/partners/unban-partner.ts
index 110443eba8..664970d4c1 100644
--- a/apps/web/lib/actions/partners/unban-partner.ts
+++ b/apps/web/lib/actions/partners/unban-partner.ts
@@ -107,8 +107,7 @@ export const unbanPartnerAction = authActionClient
},
}),
- // Queue an index update because the enrollment status moved back to
- // approved.
+ // Queue an index update because the enrollment status moved back to approved
queuePartnerSearchSync({ partnerIds: [partnerId], programId }),
]),
);
diff --git a/apps/web/lib/api/groups/move-partners-to-group.ts b/apps/web/lib/api/groups/move-partners-to-group.ts
index 9208f8e724..494c253b79 100644
--- a/apps/web/lib/api/groups/move-partners-to-group.ts
+++ b/apps/web/lib/api/groups/move-partners-to-group.ts
@@ -190,8 +190,7 @@ export async function movePartnersToGroup({
recordLink(partnerLinks),
- // Queue an index update because the enrollments moved group, which is
- // filterable.
+ // Queue an index update because the enrollments moved group (filterable field)
queuePartnerSearchSync({
enrollmentIds: updatedProgramEnrollments.map(({ id }) => id),
}),
diff --git a/apps/web/lib/api/partners/applications/reject-partner.ts b/apps/web/lib/api/partners/applications/reject-partner.ts
index 96bdbf151d..56e5a5d60b 100644
--- a/apps/web/lib/api/partners/applications/reject-partner.ts
+++ b/apps/web/lib/api/partners/applications/reject-partner.ts
@@ -147,9 +147,8 @@ export async function rejectPartner({
waitUntil(
Promise.allSettled([
- // Queue an index update because the enrollment was either rejected or
- // deleted. The job reads the ID back, so this does not need to know
- // which.
+ // Queue an index update because the enrollment was either rejected or deleted.
+ // The job reads the ID back, so this does not need to know which.
queuePartnerSearchSync({ enrollmentIds: [programEnrollment.id] }),
trackActivityLog({
diff --git a/apps/web/lib/api/partners/bulk-reactivate-partners.ts b/apps/web/lib/api/partners/bulk-reactivate-partners.ts
index daa56eaa69..c837635542 100644
--- a/apps/web/lib/api/partners/bulk-reactivate-partners.ts
+++ b/apps/web/lib/api/partners/bulk-reactivate-partners.ts
@@ -155,8 +155,7 @@ export async function bulkReactivatePartners({
})),
),
- // Queue an index update because the enrollment statuses moved back to
- // approved.
+ // Queue an index update because the enrollment statuses moved back to approved
queuePartnerSearchSync({
enrollmentIds: programEnrollments.map(({ id }) => id),
}),
diff --git a/apps/web/lib/jobs/handlers/partner-tag-deleted-job.ts b/apps/web/lib/jobs/handlers/partner-tag-deleted-job.ts
index 0a4081106f..1f25920576 100644
--- a/apps/web/lib/jobs/handlers/partner-tag-deleted-job.ts
+++ b/apps/web/lib/jobs/handlers/partner-tag-deleted-job.ts
@@ -70,8 +70,7 @@ export const partnerTagDeletedJob = defineJob({
`[partnerTagDeletedJob] Deleted ${count} program–partner tag associations.`,
);
- // Queue an index update because the tag was removed from these
- // enrollments.
+ // Queue an index update because the tag was removed from these enrollments.
await queuePartnerSearchSync({
enrollmentIds: programPartnerTags.map(
({ programEnrollment }) => programEnrollment.id,
diff --git a/apps/web/lib/partners/complete-program-applications.ts b/apps/web/lib/partners/complete-program-applications.ts
index 43c3bdd3cf..596d5615a1 100644
--- a/apps/web/lib/partners/complete-program-applications.ts
+++ b/apps/web/lib/partners/complete-program-applications.ts
@@ -274,8 +274,7 @@ export async function completeProgramApplications(userEmail: string) {
),
);
- // Queue an index update because the applications completed into
- // enrollments.
+ // Queue an index update because the applications completed into enrollments.
await queuePartnerSearchSync({
enrollmentIds: programEnrollments.map(({ id }) => id),
});