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 @@