summaryrefslogtreecommitdiff
path: root/src/routes/contact
diff options
context:
space:
mode:
authorLogan Hunt <loganhunt@simponic.xyz>2022-05-05 20:01:22 +0100
committerLogan Hunt <loganhunt@simponic.xyz>2022-05-05 20:01:22 +0100
commit09d685c0638adf4c62ca63ce8384d2816f3a05c8 (patch)
treefad8e7a8456b127d77ce9ce8f750f2badb48e725 /src/routes/contact
parent46acd38280d60f07cfce96af9cd241cb2c777c75 (diff)
downloadmistymountainstherapy-09d685c0638adf4c62ca63ce8384d2816f3a05c8.tar.gz
mistymountainstherapy-09d685c0638adf4c62ca63ce8384d2816f3a05c8.zip
Updates and remove random get route
Diffstat (limited to 'src/routes/contact')
-rw-r--r--src/routes/contact/submit.js14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/routes/contact/submit.js b/src/routes/contact/submit.js
index cf0d65c..fd78dfc 100644
--- a/src/routes/contact/submit.js
+++ b/src/routes/contact/submit.js
@@ -2,17 +2,6 @@ import 'dotenv/config';
import sgMail from '@sendgrid/mail';
sgMail.setApiKey(process.env.SENDGRID_API_KEY);
-export async function get() {
- const items = [
- {a: 1, b: 2},
- {a: 3, b: 4},
- {a: 5, b: 6},
- ];
- return {
- body: items
- };
-}
-
export async function post({ request }) {
const body = await request.json();
const { HCAPTCHA_SECRET, FORM_FROM_EMAIL, FORM_TO_EMAIL } = process.env;
@@ -44,8 +33,7 @@ export async function post({ request }) {
`,
};
- const messageSent = await sgMail
- .send(msg)
+ const messageSent = await sgMail.send(msg)
.then(() => true)
.catch((error) => {
console.error(error);