The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
update scheduleABTestCompletion
Steven Tey846647d60139
diff --git a/apps/web/lib/api/links/complete-ab-tests.ts b/apps/web/lib/api/links/complete-ab-tests.tsindex 8d20fa5b4d..0d1415e346 100644--- a/apps/web/lib/api/links/complete-ab-tests.ts+++ b/apps/web/lib/api/links/complete-ab-tests.ts@@ -18,7 +18,6 @@ export async function completeABTests(link: Link & { project: Project }) {groupBy: "top_urls",linkId: link.id,workspaceId: link.projectId,- dataAvailableFrom: link.project.createdAt,start: link.testStartedAt ? new Date(link.testStartedAt) : undefined,end: link.testCompletedAt,});diff --git a/apps/web/lib/api/links/update-link.ts b/apps/web/lib/api/links/update-link.tsindex 19c75810e4..9747e472bd 100644--- a/apps/web/lib/api/links/update-link.ts+++ b/apps/web/lib/api/links/update-link.ts@@ -67,6 +67,7 @@ export async function updateLink({testCompletedAt,...rest} = updatedLink;+ const changedTestCompletedAt = testCompletedAt !== oldLink.testCompletedAt;const combinedTagIds = combineTagIds({ tagId, tagIds });@@ -195,7 +196,10 @@ export async function updateLink({webhookIds,}),- testVariants && testCompletedAt && scheduleABTestCompletion(response),+ changedTestCompletedAt &&+ testVariants &&+ testCompletedAt &&+ scheduleABTestCompletion(response),]),);