Adding notify JS to alert if connexion to APIs is lost.
This commit is contained in:
@ -31,7 +31,8 @@ function showKarts() {
|
||||
});
|
||||
},
|
||||
error: function (xhr) {
|
||||
alert('Request Status: ' + xhr.status + ' Status Text: ' + xhr.statusText + ' ' + xhr.responseText);
|
||||
$.notify("APIs unreachable!", "error");
|
||||
console.log('Request Status: ' + xhr.status + ' Status Text: ' + xhr.statusText + ' ' + xhr.responseText);
|
||||
},
|
||||
});
|
||||
}
|
||||
@ -54,7 +55,8 @@ function getKartsMenu() {
|
||||
});
|
||||
},
|
||||
error: function (xhr) {
|
||||
alert('Request Status: ' + xhr.status + ' Status Text: ' + xhr.statusText + ' ' + xhr.responseText);
|
||||
$.notify("APIs unreachable!", "error");
|
||||
console.log('Request Status: ' + xhr.status + ' Status Text: ' + xhr.statusText + ' ' + xhr.responseText);
|
||||
},
|
||||
});
|
||||
}
|
||||
@ -129,7 +131,8 @@ function getPilotsByKart() {
|
||||
});
|
||||
},
|
||||
error: function (xhr) {
|
||||
alert('Request Status: ' + xhr.status + ' Status Text: ' + xhr.statusText + ' ' + xhr.responseText);
|
||||
$.notify("APIs unreachable!", "error");
|
||||
console.log('Request Status: ' + xhr.status + ' Status Text: ' + xhr.statusText + ' ' + xhr.responseText);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user