Prevent compliance from triggering prematurely
This commit is contained in:
parent
09332c37db
commit
18bbfc6def
2 changed files with 12 additions and 8 deletions
|
|
@ -221,6 +221,7 @@ function getCustomerWithPhoneCode (req, res, next) {
|
|||
|
||||
function updateCustomer (req, res, next) {
|
||||
const id = req.params.id
|
||||
const txId = req.query.txId
|
||||
const patch = req.body
|
||||
const config = configManager.unscoped(req.settings.config)
|
||||
|
||||
|
|
@ -232,7 +233,7 @@ function updateCustomer (req, res, next) {
|
|||
return compliance.validationPatch(req.deviceId, config, mergedCustomer)
|
||||
.then(_.merge(patch))
|
||||
.then(newPatch => customers.updatePhotoCard(id, newPatch))
|
||||
.then(newPatch => customers.update(id, newPatch))
|
||||
.then(newPatch => customers.update(id, newPatch, null, txId))
|
||||
})
|
||||
.then(customer => respond(req, res, { customer }))
|
||||
.catch(next)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue