feat: customer auth via email
This commit is contained in:
parent
92a3f16c80
commit
ab304093f3
22 changed files with 252 additions and 27 deletions
|
|
@ -66,8 +66,19 @@ function getPhoneTx (req, res, next) {
|
|||
return next(httpError('Not Found', 404))
|
||||
}
|
||||
|
||||
function getEmailTx (req, res, next) {
|
||||
if (req.query.email) {
|
||||
return helpers.fetchEmailTx(req.query.email)
|
||||
.then(r => res.json(r))
|
||||
.catch(next)
|
||||
}
|
||||
|
||||
return next(httpError('Not Found', 404))
|
||||
}
|
||||
|
||||
router.post('/', postTx)
|
||||
router.get('/:id', getTx)
|
||||
router.get('/', getPhoneTx)
|
||||
router.get('/', getEmailTx)
|
||||
|
||||
module.exports = { postTx, getTx, getPhoneTx, router }
|
||||
module.exports = { postTx, getTx, getPhoneTx, getEmailTx, router }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue