Skip to content

Commit

Permalink
Merge pull request #2 from username0x0a/api-v2-update
Browse files Browse the repository at this point in the history
Updated API v2 paths
  • Loading branch information
pauleeeeee committed Apr 17, 2020
2 parents 59e3820 + cde45eb commit 1a4f796
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1a4f796

Please sign in to comment.