I would like to have an async postConfigs funcion in my iparams.js file, since I would like to fetch some data from an API and save it as an iparam. the function only needs the credentials the user input into the other fields.
If this function is defined as aync however, an error is logged into the browser console and the function doesn’t work.
Here is a simple example of what I would like to do:
async function postConfigs() {
…get values of input fields, mainly credentials…
const response = await client.request.invokeTemplate(“fetchSomeData”, {
…credentials from the fields above… })
…extract attribute from response and save as iparam…
}
