diff options
| -rw-r--r-- | routes/referrals.js | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/routes/referrals.js b/routes/referrals.js index fb473cca..1d604a01 100644 --- a/routes/referrals.js +++ b/routes/referrals.js @@ -232,13 +232,30 @@ router.post( debug('email: ' + email) debug('sms: ' + sms) + console.log(email + ' BODY: ' + JSON.stringify(req.body)) + await db.WaitingList.create({ + email: email, + sms: sms + }) + + res.send({success: true, message: 'Added ' + email + ' to waiting list ' + sms}) + }) +); +router.get( + "/joinQueue", + ah(async (req, res) => { + const {email, sms} = req.query; + + debug('email: ' + email) + debug('sms: ' + sms) + console.log(email + ' BODY: ' + JSON.stringify(req.body)) await db.WaitingList.create({ email: email, sms: sms }) - res.send({success: true, message: 'Added to waiting list'}) + res.send({success: true, message: 'Added ' + email + ' to waiting list ' + sms}) }) ); |
