mirror of
https://github.com/kennethnym/aris.git
synced 2026-03-20 17:11:17 +00:00
fix(waitlist): use segments instead of audienceId
Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
@@ -62,10 +62,10 @@ export async function action({ request }: Route.ActionArgs) {
|
|||||||
|
|
||||||
const resend = new Resend(process.env.RESEND_API_KEY)
|
const resend = new Resend(process.env.RESEND_API_KEY)
|
||||||
|
|
||||||
const audienceId = process.env.RESEND_AUDIENCE_ID!
|
const segmentId = "b80fb036-74a1-4f7d-bca5-2c035b696071"
|
||||||
|
|
||||||
const dup = await resend.contacts.get({
|
const dup = await resend.contacts.get({
|
||||||
audienceId,
|
segmentId,
|
||||||
email,
|
email,
|
||||||
})
|
})
|
||||||
if (dup.data) {
|
if (dup.data) {
|
||||||
@@ -73,8 +73,8 @@ export async function action({ request }: Route.ActionArgs) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const res = await resend.contacts.create({
|
const res = await resend.contacts.create({
|
||||||
audienceId,
|
|
||||||
email,
|
email,
|
||||||
|
segments: [{ id: segmentId }],
|
||||||
})
|
})
|
||||||
|
|
||||||
if (res.error) {
|
if (res.error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user