Skip to content

Commit a503378

Browse files
author
Mark Sargento
committed
Ommitted extra api call for country tracking
1 parent da18f4e commit a503378

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

telnet.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ async function fetchByCountry(query) {
2020
// empty, country, history, chartType
2121
const [_x, country, history, chartType] = query.split('/'),
2222
countryData = await axios.get(`${apiBaseURL}/countries/${country}`),
23-
all = await axios.get(`${apiBaseURL}/all`),
24-
u = all.data,
2523
d = countryData.data;
2624

2725
if (_x.length > 0) throw "Invalid query format. Must Start with \/"
@@ -34,15 +32,15 @@ async function fetchByCountry(query) {
3432
d.country, d.cases, d.todayCases,
3533
d.deaths, d.todayDeaths, d.recovered,
3634
d.active, d.critical, d.casesPerOneMillion,
37-
u.updated, h, chartType || 'cases'
35+
d.updated, h, chartType || 'cases'
3836
)
3937
}
4038

4139
return covid19.covid19countrytracker(
4240
d.country, d.cases, d.todayCases,
4341
d.deaths, d.todayDeaths, d.recovered,
4442
d.active, d.critical, d.casesPerOneMillion,
45-
u.updated
43+
d.updated
4644
);
4745
}
4846

0 commit comments

Comments
 (0)