Merge pull request #1731 from RafaelTaranto/fix/email-authentication-last-update

LAM-1204 fix: email authentication last used machine
This commit is contained in:
Rafael Taranto 2024-11-20 13:50:54 +00:00 committed by GitHub
commit d953332bd5

View file

@ -311,6 +311,7 @@ function getOrAddCustomerPhone (req, res, next) {
}
function getOrAddCustomerEmail (req, res, next) {
const deviceId = req.deviceId
const customerData = req.body
const pi = plugins(req.settings, req.deviceId)
@ -318,7 +319,7 @@ function getOrAddCustomerEmail (req, res, next) {
return pi.getEmailCode(email)
.then(code => {
return addOrUpdateCustomer(customerData, req.settings.config, true)
return addOrUpdateCustomer(customerData, deviceId, req.settings.config, true)
.then(customer => respond(req, res, { code, customer }))
})
.catch(err => {