I have a function which should do something with a promise (returned from another function) and return a value, which should not be a promise.
How can I do that without converting it into a async function?
Is it possible to do it with a generator?
Thanks
function (intents, entities, resObject) {
let output = [];
...
output[0]= "test"
//returns a promise
var res = dbAccess.getFreeBaggage("IntercontEconomyLightFTL");
let HBWeight = res[0].HBWeight;
console.log("Result ", HBWeight, NumOfHB);*/
output[1] = res[0].HBWeight;
...
return output;
},