Merge pull request #1731 from RafaelTaranto/fix/email-authentication-last-update
LAM-1204 fix: email authentication last used machine
This commit is contained in:
commit
d953332bd5
1 changed files with 2 additions and 1 deletions
|
|
@ -311,6 +311,7 @@ function getOrAddCustomerPhone (req, res, next) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getOrAddCustomerEmail (req, res, next) {
|
function getOrAddCustomerEmail (req, res, next) {
|
||||||
|
const deviceId = req.deviceId
|
||||||
const customerData = req.body
|
const customerData = req.body
|
||||||
|
|
||||||
const pi = plugins(req.settings, req.deviceId)
|
const pi = plugins(req.settings, req.deviceId)
|
||||||
|
|
@ -318,7 +319,7 @@ function getOrAddCustomerEmail (req, res, next) {
|
||||||
|
|
||||||
return pi.getEmailCode(email)
|
return pi.getEmailCode(email)
|
||||||
.then(code => {
|
.then(code => {
|
||||||
return addOrUpdateCustomer(customerData, req.settings.config, true)
|
return addOrUpdateCustomer(customerData, deviceId, req.settings.config, true)
|
||||||
.then(customer => respond(req, res, { code, customer }))
|
.then(customer => respond(req, res, { code, customer }))
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue