From b1b7c233448ed75e3eadf0a45adeaf9f51b5535f Mon Sep 17 00:00:00 2001 From: Rafael Date: Mon, 18 Nov 2024 14:36:13 +0000 Subject: [PATCH] fix: email authentication last used machine --- lib/routes/customerRoutes.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/routes/customerRoutes.js b/lib/routes/customerRoutes.js index 3a00fe6e..f9120b84 100644 --- a/lib/routes/customerRoutes.js +++ b/lib/routes/customerRoutes.js @@ -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 => {