diff --git a/server/index.js b/server/index.js index 9f75402..010317c 100644 --- a/server/index.js +++ b/server/index.js @@ -269,7 +269,7 @@ router.post('/pledge', async (req, res) => { errors: errors, }) - res.end(output) + res.send(output) return } @@ -283,7 +283,7 @@ router.post('/pledge', async (req, res) => { error: "Sorry, something went wrong while saving your pledge and we don't know what in was. This website is still in beta so we do have a glitches once in a while. Apologies and please try again...🙁", }) - res.end(output) + res.send(output) return } @@ -337,7 +337,7 @@ The Snipette Team` twing.render('pledge.htm.twig', { 'email': pledge.get('email'), }).then((output) => { - res.end(output) + res.send(output) }) }) @@ -358,7 +358,7 @@ router.get('/verify', async (req, res) => { error: "Sorry, looks like your link has expired. Please go back and try pledging again. Hopefully you'll manage it quicker this time 😛", }) - res.end(output) + res.send(output) return } else { @@ -366,7 +366,7 @@ router.get('/verify', async (req, res) => { error: "An unknown error occurred. Please generate a new link and try again. Sorry for the inconvenience 🤦", }) - res.end(output) + res.send(output) return } } @@ -390,7 +390,7 @@ router.get('/verify', async (req, res) => { error: "That pledge was not found in our records. Are you sure you made it? 🔎", }) - res.end(output) + res.send(output) return } else { @@ -398,7 +398,7 @@ router.get('/verify', async (req, res) => { error: "An unknown error occurred. Please generate a new link and try again. Sorry for the inconvenience 🤦", }) - res.end(output) + res.send(output) return } } @@ -474,7 +474,7 @@ The Snipette Team` router.get('/thanks', async (req, res) => { let output = await twing.render('thanks.htm.twig') - res.end(output) + res.send(output) return })