The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
simplify createPlainThread
Steven Tey1a20c61c6ed4
diff --git a/apps/web/lib/plain.ts b/apps/web/lib/plain.tsindex e446cf8ae5..723595de69 100644--- a/apps/web/lib/plain.ts+++ b/apps/web/lib/plain.ts@@ -27,13 +27,10 @@ export const upsertPlainCustomer = async (user: PlainUser) => {export const createPlainThread = async ({user,- title,- components,+ ...rest}: {user: PlainUser;- title: string;- components: CreateThreadInput["components"];-}) => {+} & Omit<CreateThreadInput, "customerIdentifier">) => {let plainCustomerId: string | undefined;const plainCustomer = await plain.getCustomerByEmail({email: user.email ?? "",@@ -56,8 +53,7 @@ export const createPlainThread = async ({customerIdentifier: {customerId: plainCustomerId,},- title,- components,+ ...rest,});if (error) {