From cde45eb22d5a4bb851aadef8e238815cd7d010d8 Mon Sep 17 00:00:00 2001 From: Michal Zelinka Date: Fri, 17 Apr 2020 10:33:08 +0200 Subject: [PATCH] Updated API URLs with a `v2` path --- src/js/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/index.js b/src/js/index.js index f3f88ec..b434c8e 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -64,7 +64,7 @@ function getWorld(){ 'Scope': 2 }; var req = new XMLHttpRequest(); - req.open('GET', "https://corona.lmao.ninja/all", true); + req.open('GET', "https://corona.lmao.ninja/v2/all", true); req.onload = function(e) { if (req.readyState == 4) { // 200 - HTTP OK @@ -98,7 +98,7 @@ function onFailure(data, error){ function getCountry(){ var req = new XMLHttpRequest(); - req.open('GET', "https://corona.lmao.ninja/countries/" + country, true); + req.open('GET', "https://corona.lmao.ninja/v2/countries/" + country, true); req.onload = function(e) { if (req.readyState == 4) { // 200 - HTTP OK @@ -133,7 +133,7 @@ function getCountry(){ function getState(){ var req = new XMLHttpRequest(); - req.open('GET', "https://corona.lmao.ninja/states/", true); + req.open('GET', "https://corona.lmao.ninja/v2/states/", true); req.onload = function(e) { if (req.readyState == 4) { // 200 - HTTP OK