minifying histogram JSON files

This commit is contained in:
frankknoll
2023-04-19 09:39:29 +02:00
parent 16c3779f90
commit 099fdd52aa
8 changed files with 81 additions and 15 deletions

View File

@@ -1,13 +1,6 @@
class HistoDescrsProvider {
static getHistoDescrs(batchcode) {
return fetch(`data/histograms/Global/${batchcode}.json`)
.then(response => response.json())
.then(histoDescrs => {
histoDescrs.histograms.sort((histoDescr1, histoDescr2) => histoDescr1.batchcodes.length - histoDescr2.batchcodes.length);
histoDescrs.histogram = histoDescrs.histograms[0].histogram;
delete histoDescrs.histograms;
return histoDescrs;
});
return fetch(`data/histograms/Global/${batchcode}.json`).then(response => response.json())
}
}