Commit 81d4741c authored by Pithon Kabiro's avatar Pithon Kabiro
Browse files

New function: combine metadata and observations

Fetch datastream metadata together with the observations
parent 11b19fd6
......@@ -393,6 +393,21 @@ export const getCombinedObservationsFromAllNextLinks = function (
});
};
const getMetadataPlusObservationsForChart = async function (promiseArray) {
const combinedResolvedPromises = [];
for (const promise of promiseArray) {
try {
const resolvedPromise = await promise;
combinedResolvedPromises.push(resolvedPromise);
} catch (err) {
console.log(err);
}
}
return combinedResolvedPromises;
};
/**
* Retrieve all the Observations from an array of Observations promises
* @async
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment