refactoring

This commit is contained in:
frankknoll
2023-01-30 23:54:17 +01:00
parent af3b61b69a
commit de917ac2b7
3 changed files with 15 additions and 6 deletions

View File

@@ -0,0 +1,11 @@
class HistoDescrsProvider {
static getHistoDescrsForBatchcode(batchcode) {
return fetch(`data/histograms/${batchcode}.json`)
.then(response => response.json())
.then(histoDescrs => {
histoDescrs.histograms.sort((histoDescr1, histoDescr2) => histoDescr1.batchcodes.length - histoDescr2.batchcodes.length);
return histoDescrs;
});
}
}