fix: simplify promise chain

This commit is contained in:
José Oliveira 2022-01-20 12:34:22 +00:00
parent 8fe9c2551a
commit a28d7d1aab
2 changed files with 3 additions and 5 deletions

View file

@ -88,7 +88,7 @@ function update (id, data, userToken, txId) {
' where id=$1 returning *'
return db.one(sql, [id])
.then(customerData => {
.then(customerData => {
return getEditedData(id)
.then(customerEditedData => selectLatestData(customerData, customerEditedData))
})