diff --git a/utils/getBar.js b/utils/getBar.js index e3dc16b..7354be5 100644 --- a/utils/getBar.js +++ b/utils/getBar.js @@ -25,8 +25,8 @@ module.exports = async ( logScale = x => (x === 0 ? undefined : Math.log(x)); } - const statesURL = `https://corona.lmao.ninja/v2/states`; - const countriesURL = `https://corona.lmao.ninja/v2/countries`; + const statesURL = `https://disease.sh/v3/covid-19/states`; + const countriesURL = `https://disease.sh/v3/covid-19/countries`; const [err, res] = await to( axios.get(states ? statesURL : countriesURL) diff --git a/utils/getCountries.js b/utils/getCountries.js index 11de616..8b4d2f0 100644 --- a/utils/getCountries.js +++ b/utils/getCountries.js @@ -17,7 +17,7 @@ module.exports = async ( if (!countryName && !states && !bar) { sortValidation(sortBy, spinner); const [err, response] = await to( - axios.get(`https://corona.lmao.ninja/v2/countries`) + axios.get(`https://disease.sh/v3/covid-19/countries`) ); handleError(`API is down, try again later.`, err, false); let allCountries = response.data; diff --git a/utils/getCountry.js b/utils/getCountry.js index 6f4cfbe..b85de1f 100644 --- a/utils/getCountry.js +++ b/utils/getCountry.js @@ -7,7 +7,7 @@ const handleError = require('cli-handle-error'); module.exports = async (spinner, table, states, countryName, options) => { if (countryName && !states && !options.chart) { const [err, response] = await to( - axios.get(`https://corona.lmao.ninja/v2/countries/${countryName}`) + axios.get(`https://disease.sh/v3/covid-19/countries/${countryName}`) ); exitCountry(err, spinner, countryName); err && spinner.stopAndPersist(); diff --git a/utils/getCountryChart.js b/utils/getCountryChart.js index 1a8bf26..44ed25e 100644 --- a/utils/getCountryChart.js +++ b/utils/getCountryChart.js @@ -9,7 +9,9 @@ const contrib = require('blessed-contrib'); module.exports = async (spinner, countryName, { chart, log }) => { if (countryName && chart) { const [err, response] = await to( - axios.get(`https://corona.lmao.ninja/v2/historical/${countryName}`) + axios.get( + `https://disease.sh/v3/covid-19/historical/${countryName}` + ) ); handleError(`API is down, try again later.`, err, false); if (response.status === 404) { diff --git a/utils/getStates.js b/utils/getStates.js index b258268..1d48b6f 100644 --- a/utils/getStates.js +++ b/utils/getStates.js @@ -16,7 +16,7 @@ module.exports = async ( if (states && !bar) { sortStatesValidation(sortBy, spinner); const [err, response] = await to( - axios.get(`https://corona.lmao.ninja/v2/states`) + axios.get(`https://disease.sh/v3/covid-19/states`) ); handleError(`API is down, try again later.`, err, false); let allStates = response.data; diff --git a/utils/getWorldwide.js b/utils/getWorldwide.js index ad91383..9ff21b7 100644 --- a/utils/getWorldwide.js +++ b/utils/getWorldwide.js @@ -5,7 +5,7 @@ const handleError = require('cli-handle-error'); module.exports = async (table, states, json) => { const [err, response] = await to( - axios.get(`https://corona.lmao.ninja/v2/all`) + axios.get(`https://disease.sh/v3/covid-19/all`) ); handleError(`API is down, try again later.`, err, false);