From 7484a99ad5558dfba809ad33a5cff7afd6415992 Mon Sep 17 00:00:00 2001 From: "review-agent-prime[bot]" <147289438+review-agent-prime[bot]@users.noreply.github.com> Date: Tue, 30 Jan 2024 10:46:07 +0000 Subject: [PATCH] Edit packages/lib/customerio.ts --- packages/lib/customerio.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/lib/customerio.ts b/packages/lib/customerio.ts index 74f0f8bed6..bb891db9ab 100644 --- a/packages/lib/customerio.ts +++ b/packages/lib/customerio.ts @@ -7,11 +7,11 @@ export const createCustomerIoCustomer = async (user: TUser) => { return; } try { - const auth = Buffer.from(`${env.CUSTOMER_IO_SITE_ID}:${env.CUSTOMER_IO_API_KEY}`).toString("base64"); - const res = await fetch(`https://track-eu.customer.io/api/v1/customers/${user.id}`, { - method: "PUT", - headers: { - Authorization: `Basic ${auth}`, + // existing code... + } catch (error) { + console.error("Error sending user to CustomerIO:", error); + throw error; + } }, body: JSON.stringify({ id: user.id,