refactor: retrieve data modal and error handling
This commit is contained in:
parent
8aabd8c056
commit
53afd7587d
5 changed files with 125 additions and 95 deletions
|
|
@ -125,7 +125,7 @@ async function updateCustomer (id, data, userToken) {
|
|||
}
|
||||
|
||||
if (data.subscriberInfo) {
|
||||
Promise.all([getCustomerById(id), settingsLoader.loadLatest()])
|
||||
await Promise.all([getCustomerById(id), settingsLoader.loadLatest()])
|
||||
.then(([customer, config]) => sms.getLookup(config, customer.phone))
|
||||
.then(res => updateSubscriberData(id, res, userToken))
|
||||
.catch(logger.error)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue