I have below function inside an async function.
await saveStock(stock).then((res) => {
addDrugToStock(stockDrug)
addSupplierToStock(stockSupplier)
});
When I run this it always saveStock function gives appropriate results. but the other two functions are not executing properly. Sometimes addDrugToStock
is working. In other times adSupplierToStock
is working. How can I run both addDrugToStock
and addSupplierToStock
at a same time.