The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
small naming changes
Steven Tey319b8a82af0c
diff --git a/apps/web/lib/api/conversions/track-sale.ts b/apps/web/lib/api/conversions/track-sale.tsindex fc74f3470f..4856ead27d 100644--- a/apps/web/lib/api/conversions/track-sale.ts+++ b/apps/web/lib/api/conversions/track-sale.ts@@ -175,18 +175,18 @@ export const trackSale = async ({});}- const newCustomerId = createId({ prefix: "cus_" });+ const finalCustomerId = createId({ prefix: "cus_" });const finalCustomerName =customerName || customerEmail || generateRandomName();const finalCustomerAvatar =customerAvatar && !isStored(customerAvatar)- ? `${R2_URL}/customers/${newCustomerId}/avatar_${nanoid(7)}`+ ? `${R2_URL}/customers/${finalCustomerId}/avatar_${nanoid(7)}`: customerAvatar;try {newCustomer = await prisma.customer.create({data: {- id: newCustomerId,+ id: finalCustomerId,name: finalCustomerName,email: customerEmail,avatar: finalCustomerAvatar,@@ -218,12 +218,7 @@ export const trackSale = async ({}// Persist customer avatar to R2 if it's not already stored- if (- customerAvatar &&- !isStored(customerAvatar) &&- finalCustomerAvatar &&- newCustomer- ) {+ if (customerAvatar && !isStored(customerAvatar) && finalCustomerAvatar) {waitUntil(storage.upload({