summaryrefslogtreecommitdiff
path: root/src/app/(main)/(home)/actions.ts
diff options
context:
space:
mode:
authorBertrand Yuan <189593334+bertyuan@users.noreply.github.com>2026-04-27 15:51:27 +0800
committerGitHub <noreply@github.com>2026-04-27 15:51:27 +0800
commit658798b3a2378bb6df16cfbb16d707c6fb719e1e (patch)
tree63fc32f5f7fda4bbf718f490e3b1640311dbf994 /src/app/(main)/(home)/actions.ts
parent8b9c0139a93c8b9d41068e5271d0fc6917d34fab (diff)
parent2e7d98420900e1d6749729ea2a94c334e7d65754 (diff)
Merge pull request #19 from bertyuan/copilot/fix-front-backend-connection
fix: patch rough frontend-backend connection issues
Diffstat (limited to 'src/app/(main)/(home)/actions.ts')
-rw-r--r--src/app/(main)/(home)/actions.ts5
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);