Skip to content
Snippets Groups Projects
Commit ab68dcd2 authored by Andreas Valder's avatar Andreas Valder
Browse files

added error handling to the moderator api in the frontend as requested in #138

parent a13befd0
No related branches found
No related tags found
No related merge requests found
......@@ -17,6 +17,7 @@ var moderator = {
dataType: "text",
contentType: "application/json",
data: JSON.stringify(dict),
error: moderator.api.handleapierror,
success: function () {
if (reload) {
window.location.reload();
......@@ -32,6 +33,7 @@ var moderator = {
dataType: "text",
contentType: "application/json",
data: JSON.stringify(value),
error: moderator.api.handleapierror,
success: function () {
if (reload) {
window.location.reload();
......@@ -39,6 +41,9 @@ var moderator = {
}
})
},
handleapierror: function(jqXHR, textStatus, errorThrow) {
alert("Fehler: "+errorThrow)
},
gethttp: function (url){
$.ajax({
method: "GET",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment