diff options
| author | copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> | 2026-04-25 12:30:41 +0000 |
|---|---|---|
| committer | Bertrand Yuan <189593334+bertyuan@users.noreply.github.com> | 2026-04-27 14:50:52 +0800 |
| commit | a5e4155a752fa090c7bc3751a803b4359453e56c (patch) | |
| tree | cb722c79333c839884195f2697365e4df0dfe47e /src/app/(main)/(home)/actions.ts | |
| parent | 8b9c0139a93c8b9d41068e5271d0fc6917d34fab (diff) | |
fix: frontend-backend connection bugs
Agent-Logs-Url: https://github.com/bertyuan/next-blog/sessions/f86da32b-3af7-4393-8077-ce3435137221
Co-authored-by: bertyuan <189593334+bertyuan@users.noreply.github.com>
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); |
