This commit is contained in:
Ross
2021-12-12 18:06:13 +00:00
parent 4a6487fcef
commit 7803c9d0e5
+12 -13
View File
@@ -142,23 +142,22 @@ async function retrievePacketList() {
error: function(httpObj, textStatus) { error: function(httpObj, textStatus) {
if (httpObj.status == 401 || httpObj.status == 404) { if (httpObj.status == 401 || httpObj.status == 404) {
$.notify("Unable to login", "error"); $.notify("Unable to login", "error");
} }
}, },
}) })
.done(function() {}) .done(function() {})
.fail(function() { //.fail(function() {
$.getJSON("packets", function(data) { // $.getJSON("packets", function(data) {
if (data.hasOwnProperty("exams")) { // if (data.hasOwnProperty("exams")) {
loadExamList(data); // loadExamList(data);
} else { // } else {
loadPacketList(data); // loadPacketList(data);
} // }
}).fail(function(jqXHR, textStatus, errorThrown) { // }).fail(function(jqXHR, textStatus, errorThrown) {
console.log("No packet list available"); // console.log("No packet list available");
showLoginDialog(); // showLoginDialog();
}); // });
}) //})
.always(function() {}); .always(function() {});
} }