diff --git a/.gitignore b/.gitignore index 51c5b10..1a0475b 100644 --- a/.gitignore +++ b/.gitignore @@ -113,3 +113,5 @@ dist .yarn/unplugged .yarn/build-state.yml .pnp.* + +.now \ No newline at end of file diff --git a/routes/index.js b/routes/index.js index adb1de2..13582e6 100644 --- a/routes/index.js +++ b/routes/index.js @@ -1,6 +1,6 @@ const express = require('express'); const cors = require('cors'); -const sendEmail = require('../api/mail'); +const sendReceivedPaymentEmail = require('../api/mail'); const router = express.Router(); @@ -8,9 +8,9 @@ router.all('*', cors()); router.get('/health', (req, res) => res.sendStatus(200)); -router.get('/', (req, res) => { - sendEmail(); - res.end(); +router.post('/payments', (req, res) => { + sendReceivedPaymentEmail(req.body); + res.json(req.body); }); module.exports = router;