fix: email authentication last used machine

This commit is contained in:
Rafael 2024-11-18 14:36:13 +00:00
parent ae30f2e704
commit b1b7c23344

View file

@ -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 => {