refactoring

This commit is contained in:
frankknoll
2023-04-03 00:15:00 +02:00
parent 2acaba79fe
commit f2e00505a7
3 changed files with 7 additions and 9 deletions

View File

@@ -1,8 +1,7 @@
class HistoDescrsProvider {
// FK-TODO: remove country
static getHistoDescrs(country, batchcode) {
return fetch(`data/histograms/${country}/${batchcode}.json`)
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);