feat: Create contact form healthcheck

This commit is contained in:
Keith Irwin 2023-11-27 21:59:02 -07:00
parent 6e3a84305e
commit 4c2f701d14
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
1 changed files with 9 additions and 0 deletions

View File

@ -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)