mirror of
https://github.com/formbricks/formbricks.git
synced 2026-05-12 00:41:58 -05:00
Edit packages/lib/customerio.ts
This commit is contained in:
committed by
GitHub
parent
bcf039030e
commit
7484a99ad5
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user