Skip to content

Commit 44c0f8a

Browse files
committed
🐛 FIX: broken links
1 parent 2967341 commit 44c0f8a

File tree

6 files changed

+9
-7
lines changed

6 files changed

+9
-7
lines changed

utils/getBar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ module.exports = async (
2525
logScale = x => (x === 0 ? undefined : Math.log(x));
2626
}
2727

28-
const statesURL = `https://corona.lmao.ninja/v2/states`;
29-
const countriesURL = `https://corona.lmao.ninja/v2/countries`;
28+
const statesURL = `https://disease.sh/v3/covid-19/states`;
29+
const countriesURL = `https://disease.sh/v3/covid-19/countries`;
3030

3131
const [err, res] = await to(
3232
axios.get(states ? statesURL : countriesURL)

utils/getCountries.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports = async (
1717
if (!countryName && !states && !bar) {
1818
sortValidation(sortBy, spinner);
1919
const [err, response] = await to(
20-
axios.get(`https://corona.lmao.ninja/v2/countries`)
20+
axios.get(`https://disease.sh/v3/covid-19/countries`)
2121
);
2222
handleError(`API is down, try again later.`, err, false);
2323
let allCountries = response.data;

utils/getCountry.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const handleError = require('cli-handle-error');
77
module.exports = async (spinner, table, states, countryName, options) => {
88
if (countryName && !states && !options.chart) {
99
const [err, response] = await to(
10-
axios.get(`https://corona.lmao.ninja/v2/countries/${countryName}`)
10+
axios.get(`https://disease.sh/v3/covid-19/countries/${countryName}`)
1111
);
1212
exitCountry(err, spinner, countryName);
1313
err && spinner.stopAndPersist();

utils/getCountryChart.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ const contrib = require('blessed-contrib');
99
module.exports = async (spinner, countryName, { chart, log }) => {
1010
if (countryName && chart) {
1111
const [err, response] = await to(
12-
axios.get(`https://corona.lmao.ninja/v2/historical/${countryName}`)
12+
axios.get(
13+
`https://disease.sh/v3/covid-19/historical/${countryName}`
14+
)
1315
);
1416
handleError(`API is down, try again later.`, err, false);
1517
if (response.status === 404) {

utils/getStates.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module.exports = async (
1616
if (states && !bar) {
1717
sortStatesValidation(sortBy, spinner);
1818
const [err, response] = await to(
19-
axios.get(`https://corona.lmao.ninja/v2/states`)
19+
axios.get(`https://disease.sh/v3/covid-19/states`)
2020
);
2121
handleError(`API is down, try again later.`, err, false);
2222
let allStates = response.data;

utils/getWorldwide.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const handleError = require('cli-handle-error');
55

66
module.exports = async (table, states, json) => {
77
const [err, response] = await to(
8-
axios.get(`https://corona.lmao.ninja/v2/all`)
8+
axios.get(`https://disease.sh/v3/covid-19/all`)
99
);
1010
handleError(`API is down, try again later.`, err, false);
1111

0 commit comments

Comments
 (0)