refactoring
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
class CompanyByBatchcodeProvider {
|
class CompanyByBatchcodeProvider {
|
||||||
|
|
||||||
static getCompany(batchcode) {
|
static getCompany(batchcode) {
|
||||||
return fetch(`data/histograms/Global/${batchcode}.json`)
|
return HistoDescrsProvider
|
||||||
.then(response => response.json())
|
.getHistoDescrs(batchcode)
|
||||||
.then(histoDescrs => histoDescrs.Company);
|
.then(histoDescrs => histoDescrs.Company);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
class HistoDescrsProvider {
|
class HistoDescrsProvider {
|
||||||
|
|
||||||
static getHistoDescrs(batchcode) {
|
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