From ac27695660de7b1f2ca5a67caeb2fe6d77cd68e9 Mon Sep 17 00:00:00 2001 From: brklntmhwk_dev <86272619+brklntmhwk@users.noreply.github.com> Date: Tue, 13 Aug 2024 08:06:05 +0000 Subject: [PATCH] =?UTF-8?q?fix(api):=20=F0=9F=90=9B=20add=20resend=20api?= =?UTF-8?q?=20key=20to=20cf=20settings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Closes: #41 --- src/lib/consts.ts | 3 ++- src/pages/[locale]/api/form.ts | 2 +- src/pages/api/form.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/consts.ts b/src/lib/consts.ts index 590b9073..4a6857db 100644 --- a/src/lib/consts.ts +++ b/src/lib/consts.ts @@ -8,7 +8,8 @@ export const FORM_TEXTAREA_ROWS = 5; export const FORM_TEXTAREA_MINLENGTH = 25; export const TURNSTILE_RETRY_INTERVAL = 15000; export const ACCOUNT_ID = 'brklntmhwk'; -export const SITE_URL = 'https://younagi.dev'; +export const SITE_DOMAIN = 'younagi.dev'; +export const SITE_URL = `https://${SITE_DOMAIN}`; export const UNSPLASH_BASE_URL = 'https://unsplash.com'; export const GITHUB_BASE_URL = 'https://github.com'; export const TURNSTILE_API_URL = diff --git a/src/pages/[locale]/api/form.ts b/src/pages/[locale]/api/form.ts index de07f85a..0cf10454 100644 --- a/src/pages/[locale]/api/form.ts +++ b/src/pages/[locale]/api/form.ts @@ -137,7 +137,7 @@ export const POST: APIRoute = async ({ const mailContent = { from: `${meta.data.site.title} <${myCustomAddress}>`, - to: myCustomAddress, + to: [myCustomAddress], subject: `${CONTACT_NOTIFICATION_SUBJECT} from ${data.name}`, text: `Name:\n${data.name}\n\n` + diff --git a/src/pages/api/form.ts b/src/pages/api/form.ts index f450bbac..32211f12 100644 --- a/src/pages/api/form.ts +++ b/src/pages/api/form.ts @@ -124,7 +124,7 @@ export const POST: APIRoute = async ({ const mailContent = { from: `${meta.data.site.title} <${myCustomAddress}>`, - to: myCustomAddress, + to: [myCustomAddress], subject: `${CONTACT_NOTIFICATION_SUBJECT} from ${data.name}`, text: `Name:\n${data.name}\n\n` +