refactoring

This commit is contained in:
Frank Knoll
2024-04-24 14:28:02 +02:00
parent b0ec2683bc
commit 3d2e0405a3
2 changed files with 4 additions and 3 deletions

View File

@@ -1,8 +1,8 @@
class CompanyByBatchcodeProvider {
static getCompany(batchcode) {
return fetch(`data/histograms/Global/${batchcode}.json`)
.then(response => response.json())
return HistoDescrsProvider
.getHistoDescrs(batchcode)
.then(histoDescrs => histoDescrs.Company);
}
}

View File

@@ -1,6 +1,7 @@
class HistoDescrsProvider {
static getHistoDescrs(batchcode) {
return fetch(`data/histograms/Global/${batchcode}.json`).then(response => response.json())
return fetch(`data/histograms/Global/${batchcode}.json`)
.then(response => response.json())
}
}