From 09d685c0638adf4c62ca63ce8384d2816f3a05c8 Mon Sep 17 00:00:00 2001 From: Logan Hunt Date: Thu, 5 May 2022 20:01:22 +0100 Subject: Updates and remove random get route --- src/routes/contact/submit.js | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'src/routes/contact') 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); -- cgit v1.2.3-70-g09d2