diff --git a/server/index.js b/server/index.js index 88e78ee..6d10ed0 100644 --- a/server/index.js +++ b/server/index.js @@ -149,7 +149,7 @@ router.post('/pledge', async (req, res) => { let messages = req.body.messages if (!!errors.length) { - res.end(`Errors: ${'' + errors}`) + res.send(`Errors: ${'' + errors}`) return } @@ -170,11 +170,11 @@ router.post('/pledge', async (req, res) => { try { await pledge.save() } catch (err) { - res.end("Sorry, something went wrong while saving your pledge and we don't know what 🙁. Please try again...") + res.send("Sorry, something went wrong while saving your pledge and we don't know what 🙁. Please try again...") return } - res.end("Thank you! We're still working on setting up this website, so as you can see this page doesn't look great at the moment, but we will be sending you a confirmation email in a few days. Watch out for an email from editors@snipettemag.com, and if it doesn't reach, check your spam box :P") + res.send("Thank you! We're still working on setting up this website, so as you can see this page doesn't look great at the moment, but we will be sending you a confirmation email in a few days. Watch out for an email from editors@snipettemag.com, and if it doesn't reach, check your spam box :P") }) router.use(express.static('dist'))