Merge pull request #1922 from RafaelTaranto/fix/email-redeem
LAM-1493 fix: email redeem
This commit is contained in:
commit
f05591e4cf
2 changed files with 4 additions and 9 deletions
|
|
@ -25,7 +25,7 @@ const performanceRoutes = require('./routes/performanceRoutes')
|
|||
const rejectIncompatibleMachines = require('./middlewares/rejectIncompatbleMachines')
|
||||
const stateRoutes = require('./routes/stateRoutes')
|
||||
const termsAndConditionsRoutes = require('./routes/termsAndConditionsRoutes')
|
||||
const { router: txRoutes } = require('./routes/txRoutes')
|
||||
const txRoutes = require('./routes/txRoutes')
|
||||
const verifyUserRoutes = require('./routes/verifyUserRoutes')
|
||||
const verifyTxRoutes = require('./routes/verifyTxRoutes')
|
||||
const verifyPromoCodeRoutes = require('./routes/verifyPromoCodeRoutes')
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ function getTx(req, res, next) {
|
|||
return next(httpError('Not Found', 404))
|
||||
}
|
||||
|
||||
function getPhoneTx(req, res, next) {
|
||||
function getPhoneOrEmailTx(req, res, next) {
|
||||
if (req.query.phone) {
|
||||
return helpers
|
||||
.fetchPhoneTx(req.query.phone)
|
||||
|
|
@ -72,10 +72,6 @@ function getPhoneTx(req, res, next) {
|
|||
.catch(next)
|
||||
}
|
||||
|
||||
return next(httpError('Not Found', 404))
|
||||
}
|
||||
|
||||
function getEmailTx(req, res, next) {
|
||||
if (req.query.email) {
|
||||
return helpers
|
||||
.fetchEmailTx(req.query.email)
|
||||
|
|
@ -88,7 +84,6 @@ function getEmailTx(req, res, next) {
|
|||
|
||||
router.post('/', postTx)
|
||||
router.get('/:id', getTx)
|
||||
router.get('/', getPhoneTx)
|
||||
router.get('/', getEmailTx)
|
||||
router.get('/', getPhoneOrEmailTx)
|
||||
|
||||
module.exports = { postTx, getTx, getPhoneTx, getEmailTx, router }
|
||||
module.exports = router
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue