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.

Fix link creation API breaks when `tagNames` passed

Kiran K0e5756233ed6
diff --git a/apps/web/lib/api/links/create-link.ts b/apps/web/lib/api/links/create-link.ts
index d0cea17850..800eca1391 100644
--- a/apps/web/lib/api/links/create-link.ts
+++ b/apps/web/lib/api/links/create-link.ts
@@ -67,9 +67,9 @@ export async function createLink(link: ProcessedLinkProps) {
name: tagName,
projectId: link.projectId as string,
},
- createdAt: new Date(new Date().getTime() + idx * 100), // increment by 100ms for correct order
},
},
+ createdAt: new Date(new Date().getTime() + idx * 100), // increment by 100ms for correct order
})),
},
}),
diff --git a/apps/web/lib/api/links/update-link.ts b/apps/web/lib/api/links/update-link.ts
index ae12b24dcb..43263201ec 100644
--- a/apps/web/lib/api/links/update-link.ts
+++ b/apps/web/lib/api/links/update-link.ts
@@ -97,9 +97,10 @@ export async function updateLink({
name: tagName,
projectId: updatedLink.projectId as string,
},
- createdAt: new Date(new Date().getTime() + idx * 100), // increment by 100ms for correct order
},
},
+ id: "new-od",
+ createdAt: new Date(new Date().getTime() + idx * 100), // increment by 100ms for correct order
})),
},
}),