refactoring
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user