refactor: retrieve data modal and error handling

This commit is contained in:
José Oliveira 2022-02-23 00:32:25 +00:00
parent 8aabd8c056
commit 53afd7587d
5 changed files with 125 additions and 95 deletions

View file

@ -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)