From 7ab199b815158070dc9d3c8949530de605ed0316 Mon Sep 17 00:00:00 2001 From: Benjamin Palko Date: Fri, 27 Mar 2026 09:39:57 -0400 Subject: [PATCH] remove subject --- src/lib/server/discord.ts | 8 +------- src/routes/contact/+page.server.ts | 11 +---------- src/routes/contact/+page.svelte | 4 ---- 3 files changed, 2 insertions(+), 21 deletions(-) diff --git a/src/lib/server/discord.ts b/src/lib/server/discord.ts index 90c2d53..a98fce2 100644 --- a/src/lib/server/discord.ts +++ b/src/lib/server/discord.ts @@ -1,11 +1,6 @@ import { DISCORD_CONTACT_WEBHOOK } from '$env/static/private'; -export async function sendContactMessage( - name: string, - email: string, - subject: string, - message: string -) { +export async function sendContactMessage(name: string, email: string, message: string) { const form = new FormData(); // We need a better way than this to format a string to markdown @@ -13,7 +8,6 @@ export async function sendContactMessage( # Someone is reaching out! From: ${name} - [${email}](mailto:${email}) - > **Subject: ${subject}** > ${message} ` .split('\n') diff --git a/src/routes/contact/+page.server.ts b/src/routes/contact/+page.server.ts index d81d8c1..999c036 100644 --- a/src/routes/contact/+page.server.ts +++ b/src/routes/contact/+page.server.ts @@ -15,10 +15,6 @@ export const actions = { return fail(400, { email: null, missing: true }); } - if (!form.has('subject')) { - return fail(400, { subject: null, missing: true }); - } - if (!form.has('message')) { return fail(400, { message: null, missing: true }); } @@ -33,18 +29,13 @@ export const actions = { return fail(400, { email, incorrect: true }); } - const subject = form.get('subject'); - if (typeof subject !== 'string') { - return fail(400, { subject, incorrect: true }); - } - const message = form.get('message'); if (typeof message !== 'string') { return fail(400, { message, incorrect: true }); } try { - const response = await sendContactMessage(name, email, subject, message); + const response = await sendContactMessage(name, email, message); return { response: { diff --git a/src/routes/contact/+page.svelte b/src/routes/contact/+page.svelte index 898a1ff..96f06d2 100644 --- a/src/routes/contact/+page.svelte +++ b/src/routes/contact/+page.svelte @@ -57,10 +57,6 @@ -