fix: give custom info back to the machine
This commit is contained in:
parent
f670061935
commit
99f8a516c3
1 changed files with 2 additions and 2 deletions
|
|
@ -6,7 +6,7 @@ const _ = require('lodash/fp')
|
|||
const compliance = require('../compliance')
|
||||
const complianceTriggers = require('../compliance-triggers')
|
||||
const configManager = require('../new-config-manager')
|
||||
const { get, add, getEditedData, selectLatestData, getCustomerById, update } = require('../customers')
|
||||
const { get, add, getEditedData, selectLatestData, getById, update } = require('../customers')
|
||||
const httpError = require('../route-helpers').httpError
|
||||
const plugins = require('../plugins')
|
||||
const Tx = require('../tx')
|
||||
|
|
@ -26,7 +26,7 @@ function addOrUpdateCustomer (req) {
|
|||
|
||||
return add(req.body)
|
||||
})
|
||||
.then(customer => Promise.all([getEditedData(customer.id), getCustomerById(customer.id)]))
|
||||
.then(customer => Promise.all([getEditedData(customer.id), getById(customer.id, null)]))
|
||||
.then(([customerEditedData, customerOriginalData]) => selectLatestData(customerOriginalData, customerEditedData))
|
||||
.then(customer => {
|
||||
// BACKWARDS_COMPATIBILITY 7.5
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue