fix: send manually entered customer data to machine
This commit is contained in:
parent
c5bf50b932
commit
c2329be588
2 changed files with 11 additions and 11 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, getById, update } = require('../customers')
|
||||
const { get, add, getById, update } = require('../customers')
|
||||
const httpError = require('../route-helpers').httpError
|
||||
const plugins = require('../plugins')
|
||||
const Tx = require('../tx')
|
||||
|
|
@ -26,8 +26,7 @@ function addOrUpdateCustomer (req) {
|
|||
|
||||
return add(req.body)
|
||||
})
|
||||
.then(customer => Promise.all([getEditedData(customer.id), getById(customer.id, null)]))
|
||||
.then(([customerEditedData, customerOriginalData]) => selectLatestData(customerOriginalData, customerEditedData))
|
||||
.then(customer => getById(customer.id))
|
||||
.then(customer => {
|
||||
// BACKWARDS_COMPATIBILITY 7.5
|
||||
// machines before 7.5 expect customer with sanctions result
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue