diff options
Diffstat (limited to 'src/app/(main)/(home)/actions.ts')
| -rw-r--r-- | src/app/(main)/(home)/actions.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/app/(main)/(home)/actions.ts b/src/app/(main)/(home)/actions.ts index 5b0c456..c4f586f 100644 --- a/src/app/(main)/(home)/actions.ts +++ b/src/app/(main)/(home)/actions.ts @@ -1,13 +1,14 @@ 'use server'; +import { env } from '@/env'; import { getContact, updateContact } from '@/lib/resend'; import { ActionError, actionClient } from '@/lib/safe-action'; import { NewsletterSchema } from '@/lib/validators'; import { getSession } from '@/server/auth'; import { Resend } from 'resend'; -const resend = new Resend(process.env.RESEND_API_KEY as string); -const audienceId = process.env.RESEND_AUDIENCE_ID as string; +const resend = new Resend(env.RESEND_API_KEY); +const audienceId = env.RESEND_AUDIENCE_ID; const splitName = (name = '') => { const [firstName, ...lastName] = name.split(' ').filter(Boolean); |
