From 4c2f701d14b00102f1878611c110a8217b2f79a1 Mon Sep 17 00:00:00 2001 From: Keith Irwin Date: Mon, 27 Nov 2023 21:59:02 -0700 Subject: [PATCH] feat: :white_check_mark: Create contact form healthcheck --- api/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/api/index.js b/api/index.js index 4ea0558..4de2b6d 100644 --- a/api/index.js +++ b/api/index.js @@ -59,6 +59,15 @@ app.get('/xmr-receive/:addr', cors, async (req, res) => { // Send email through contact form app.options('/contact', cors) .post('/contact', jsonBodyParser, cors, require('./contact')) +// Healthcheck contact form +app.get('/contact', async (req,res) => { + try { + await require('../lib/mailer').verify() + return res.sendStatus(200) + } catch (err) { + return res.status(500).send(err) + } +}) // Send bug report through disclosure form app.options('/bug', cors)