I added a button to a table that forms a task when the button is clicked.
The task is an async call to a REST API using Javascript's fetch. I'd like to be able to display the state of the operation, including when its completed.
The code:
// make the REST API with an async function
const response = await updateLicense(config.access_token, employeeNumber, licenseNumber);
// dispay the results of the processing
output.text(response)
Unfortunately, the code doesn't wait for the updateLicense function to complete. Any ideas?